Spaces:
Sleeping
Sleeping
logs
Browse files
patches/src/components/buttons/InteractButton.tsx
CHANGED
@@ -17,6 +17,7 @@ export default function InteractButton() {
|
|
17 |
const game = useServerGame(worldId);
|
18 |
const oauth = JSON.parse(localStorage.getItem('oauth'));
|
19 |
const oauthToken = oauth ? oauth.userInfo.fullname : undefined;
|
|
|
20 |
const humanTokenIdentifier = useQuery(api.world.userStatus, worldId ? { worldId, oauthToken } : 'skip');
|
21 |
const userPlayerId =
|
22 |
game && [...game.world.players.values()].find((p) => p.human === humanTokenIdentifier)?.id;
|
@@ -30,6 +31,7 @@ export default function InteractButton() {
|
|
30 |
let inputId;
|
31 |
try {
|
32 |
inputId = await join({ worldId, oauthToken });
|
|
|
33 |
} catch (e: any) {
|
34 |
if (e instanceof ConvexError) {
|
35 |
toast.error(e.data);
|
|
|
17 |
const game = useServerGame(worldId);
|
18 |
const oauth = JSON.parse(localStorage.getItem('oauth'));
|
19 |
const oauthToken = oauth ? oauth.userInfo.fullname : undefined;
|
20 |
+
console.log("oauthToken",oauthToken)
|
21 |
const humanTokenIdentifier = useQuery(api.world.userStatus, worldId ? { worldId, oauthToken } : 'skip');
|
22 |
const userPlayerId =
|
23 |
game && [...game.world.players.values()].find((p) => p.human === humanTokenIdentifier)?.id;
|
|
|
31 |
let inputId;
|
32 |
try {
|
33 |
inputId = await join({ worldId, oauthToken });
|
34 |
+
console.log("sucess")
|
35 |
} catch (e: any) {
|
36 |
if (e instanceof ConvexError) {
|
37 |
toast.error(e.data);
|