File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ Alternatively, you can use a React Context Provider to manage the connection and
64
64
``` typescript filename="RoomContext.tsx"
65
65
import React , { createContext , useContext } from ' react' ;
66
66
import { Room } from ' colyseus.js' ;
67
+ import type { MyRoomState } from " ../../backend/src/rooms/MyRoomState" ;
67
68
68
69
interface RoomContextType {
69
70
isConnecting: boolean ;
@@ -91,7 +92,7 @@ export function RoomProvider({ children }: { children: React.ReactNode }) {
91
92
const [joinError, setJoinError] = React .useState (false );
92
93
const [isConnecting, setIsConnecting] = React .useState (false );
93
94
const [isConnected, setIsConnected] = React .useState (false );
94
- const [state, setState] = React .useState <ReturnType <BalootiState [' toJSON' ]>>(undefined )
95
+ const [state, setState] = React .useState <ReturnType <MyRoomState [' toJSON' ]>>(undefined )
95
96
96
97
const join = () => {
97
98
if (hasActiveJoinRequest ) { return ; }
You can’t perform that action at this time.
0 commit comments