From 383cdf6f03acb828321270ce07e20b2b6f8361a5 Mon Sep 17 00:00:00 2001 From: Face <69168154+face-hh@users.noreply.github.com> Date: Wed, 28 May 2025 16:49:13 +0300 Subject: [PATCH] fix: more routes in layout.svelte --- website/src/lib/auth.ts | 7 ++----- website/src/routes/+layout.svelte | 12 ++++++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/website/src/lib/auth.ts b/website/src/lib/auth.ts index 39527a0..1f66919 100644 --- a/website/src/lib/auth.ts +++ b/website/src/lib/auth.ts @@ -36,7 +36,7 @@ export const auth = betterAuth({ const blob = await response.blob(); const arrayBuffer = await blob.arrayBuffer(); s3ImageKey = await uploadProfilePicture( - profile.sub, // Using Google 'sub' for a unique identifier + profile.sub, new Uint8Array(arrayBuffer), blob.type, blob.size @@ -50,7 +50,7 @@ export const auth = betterAuth({ return { name: profile.name, email: profile.email, - image: s3ImageKey, // Store S3 key in the standard 'image' field + image: s3ImageKey, username: newUsername, }; }, @@ -64,9 +64,6 @@ export const auth = betterAuth({ banReason: { type: "string", required: false, input: false }, baseCurrencyBalance: { type: "string", required: false, input: false }, bio: { type: "string", required: false }, - // Ensure 'image' is not listed here if it's a core field, - // or ensure 'avatarUrl' is used consistently if it is an additional field. - // Based on current setup, 'image' is core. } }, session: { diff --git a/website/src/routes/+layout.svelte b/website/src/routes/+layout.svelte index acc5698..b7b29f1 100644 --- a/website/src/routes/+layout.svelte +++ b/website/src/routes/+layout.svelte @@ -89,16 +89,24 @@ '/coin/create': 'Create Coin', '/settings': 'Settings', '/admin': 'Admin', - '/transactions': 'Transactions' + '/admin/promo': 'Promo Codes', + '/transactions': 'Transactions', + '/hopium': 'Hopium', + '/gambling': 'Gambling', + '/live': 'Live Trades', + '/treemap': 'Treemap' }; // Handle dynamic routes if (routeId.startsWith('/coin/[coinSymbol]')) { return 'Coin Details'; } - if (routeId.startsWith('/user/[userId]')) { + if (routeId.startsWith('/user/[username]')) { return 'User Profile'; } + if (routeId.startsWith('/hopium/[id]')) { + return 'Prediction Question'; + } return titleMap[routeId] || 'Rugplay'; }