diff options
Diffstat (limited to 'components/socketContext.tsx')
-rw-r--r-- | components/socketContext.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/components/socketContext.tsx b/components/socketContext.tsx index f493d73..435f4a7 100644 --- a/components/socketContext.tsx +++ b/components/socketContext.tsx @@ -1,12 +1,11 @@ -import { ReactNode, createContext } from 'react'; +import { createContext, ReactNode } from 'react'; import { io as socket, Socket } from 'socket.io-client'; -export var SocketContext = createContext<{ io?: Socket }>({}); -export function SocketContextWrapper(props: { children?: ReactNode }) { +export var SocketContext = createContext<{ io?: Socket; }>({}); +export function SocketContextWrapper(props: { children?: ReactNode; }) { var io = socket(); return <SocketContext.Provider value={{ io }}> - { props.children } - </SocketContext.Provider> + {props.children} + </SocketContext.Provider>; } - |