Skip to content

Commit

Permalink
hitfix: url extraction was wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMugen committed Nov 14, 2024
1 parent 2b67dee commit fce95c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions client/src/routes/[slug]/game/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
const gameStorePromise = $state(Game(parseInt(data.gameId)))
$effect(() => {
console.log('gameStorePromise', data)
})
/*
onMount(async () => {
if ($env === 'mainnet') {
Expand Down
7 changes: 4 additions & 3 deletions client/src/routes/[slug]/game/[slug]/+page.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export function load({ url }) {
const firstSegment = url.pathname.split('/').filter(Boolean)[0]; // Extract the first path segment
const segments = url.pathname.split('/').filter(Boolean)
const gameId = segments[segments.length - 1] // Get the last segment
return {
network: firstSegment,
};
gameId,
}
}

0 comments on commit fce95c9

Please sign in to comment.