From 8db7b73b46b37e47ce897df52f2bbf8fb7f8b0d2 Mon Sep 17 00:00:00 2001 From: GamerBoss101 Date: Sun, 15 Sep 2024 07:31:10 -0400 Subject: [PATCH] Center Div --- src/lib/components/form/Survey.svelte | 10 ++++++++-- src/routes/food/[id]/+page.svelte | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/components/form/Survey.svelte b/src/lib/components/form/Survey.svelte index 92e9505..fe40a1e 100644 --- a/src/lib/components/form/Survey.svelte +++ b/src/lib/components/form/Survey.svelte @@ -8,12 +8,18 @@ import SignIn from './SignIn.svelte'; - console.log($page.data.authInfo); + let userID; + + if ($page.data.authInfo) { + userID = $page.data.authInfo.user.userId; + } else { + userID = null; + } let formData = writable({ answers: [], currentQuestion: 1, - userID: $page.data.authInfo.user.userId || null, + userID: userID }); export let numQuestion = 0; diff --git a/src/routes/food/[id]/+page.svelte b/src/routes/food/[id]/+page.svelte index 292c271..7bd4f22 100644 --- a/src/routes/food/[id]/+page.svelte +++ b/src/routes/food/[id]/+page.svelte @@ -64,8 +64,8 @@

You Want

-

{foodData.name}

-

{foodData.description}

+

{foodData.name}

+

{foodData.description}

{#if !showRecipe}