simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 1 | import { createContext } from 'react'; |
idillon | 322e4ac | 2022-09-14 12:48:43 -0400 | [diff] [blame] | 2 | |
Adrien BĂ©raud | 023f7cf | 2022-09-18 14:57:53 -0400 | [diff] [blame] | 3 | export const SocketContext = createContext(); |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 4 | export const SocketProvider = ({ socket, children }) => ( |
5 | <SocketContext.Provider value={socket}>{children}</SocketContext.Provider> | ||||
6 | ); |