This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { FederatedProvider } from './federated-provider'; | |
import { scopes } from './scopes'; | |
// This is an example app on how you would setup your Nextjs app | |
const App = ({ Component }) => { | |
return ( | |
<FederatedProvider scopes={scopes}> | |
<Component /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { ReactNode, useContext, useEffect, useState } from 'react'; | |
import { Websocket } from './websocket'; | |
export type EchoWebSocketContextType = [ | |
(event: any, filter?: string) => void, | |
(event: any) => void | |
]; | |
export const EchoWebSocketContext = React.createContext<EchoWebSocketContextType>([ | |
() => {}, | |
() => {}, |