Spaces:
Sleeping
Sleeping
fix
Browse files- src/components/Game.tsx +3 -2
src/components/Game.tsx
CHANGED
@@ -21,7 +21,8 @@ import GameVote from './GameVote.tsx';
|
|
21 |
import { EndGame } from './EndGame.tsx';
|
22 |
|
23 |
export const SHOW_DEBUG_UI = !!import.meta.env.VITE_SHOW_DEBUG_UI;
|
24 |
-
|
|
|
25 |
export function GameStateLabel(game: GameObj, me: PlayerDescription | undefined) {
|
26 |
switch (game.world.gameCycle.cycleState) {
|
27 |
case 'Day':
|
@@ -91,7 +92,7 @@ export default function Game() {
|
|
91 |
|
92 |
const scrollViewRef = useRef<HTMLDivElement>(null);
|
93 |
|
94 |
-
const humanTokenIdentifier = useQuery(api.world.userStatus, worldId ? { worldId } : 'skip');
|
95 |
if (!worldId || !engineId || !game ) {
|
96 |
return null;
|
97 |
}
|
|
|
21 |
import { EndGame } from './EndGame.tsx';
|
22 |
|
23 |
export const SHOW_DEBUG_UI = !!import.meta.env.VITE_SHOW_DEBUG_UI;
|
24 |
+
const oauth = JSON.parse(localStorage.getItem('oauth'));
|
25 |
+
const oauthToken = oauth ? oauth.userInfo.fullname : undefined;
|
26 |
export function GameStateLabel(game: GameObj, me: PlayerDescription | undefined) {
|
27 |
switch (game.world.gameCycle.cycleState) {
|
28 |
case 'Day':
|
|
|
92 |
|
93 |
const scrollViewRef = useRef<HTMLDivElement>(null);
|
94 |
|
95 |
+
const humanTokenIdentifier = useQuery(api.world.userStatus, worldId ? { worldId ,oauthToken} : 'skip');
|
96 |
if (!worldId || !engineId || !game ) {
|
97 |
return null;
|
98 |
}
|