From 79e401a91797d09e0261aadf509f3dc416ab3a0a Mon Sep 17 00:00:00 2001 From: Bradley Shellnut Date: Thu, 6 Oct 2022 17:06:58 -0500 Subject: [PATCH] Fixing env in the game page. --- src/routes/+layout.svelte | 272 +++++++++++++-------------- src/routes/api.ts | 4 +- src/routes/game/[id]/+page.server.ts | 3 +- 3 files changed, 140 insertions(+), 139 deletions(-) diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2c5e64f..12ce4d4 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,159 +1,159 @@ {#if dev} - + {/if} - - {#if $boredState?.loading} - - -
- -

Loading...

-
-
-
- - {/if} - {#if isOpen} -
- -
- {/if} - + + {#if $boredState?.loading} + + +
+ +

Loading...

+
+
+
+ + {/if} + {#if isOpen} +
+ +
+ {/if} + diff --git a/src/routes/api.ts b/src/routes/api.ts index cf7e015..4f5a9c1 100644 --- a/src/routes/api.ts +++ b/src/routes/api.ts @@ -8,7 +8,7 @@ (The data on the todo app will expire periodically; no guarantees are made. Don't use it to organize your life.) */ - +import { BOARD_GAME_ATLAS_CLIENT_ID } from '$env/static/private'; import { URLSearchParams } from 'url'; const base = 'https://api.boardgameatlas.com/api'; @@ -20,7 +20,7 @@ export function boardGameApi( data?: Record ) { // console.log('queryParams', queryParams); - queryParams.client_id = import.meta.env.VITE_PUBLIC_CLIENT_ID; + queryParams.client_id = BOARD_GAME_ATLAS_CLIENT_ID; const urlQueryParams = new URLSearchParams(queryParams); const url = `${base}/${resource}${urlQueryParams ? `?${urlQueryParams}` : ''}`; return fetch(url, { diff --git a/src/routes/game/[id]/+page.server.ts b/src/routes/game/[id]/+page.server.ts index 72961b0..7f1c77b 100644 --- a/src/routes/game/[id]/+page.server.ts +++ b/src/routes/game/[id]/+page.server.ts @@ -14,7 +14,8 @@ type GamePageParams = { // } export const load: PageServerLoad = async ({ params }: GamePageParams) => { - console.log('params', params); + console.log('params', params); + debugger; const queryParams = { ids: `${params?.id}` };