From 59911f71c1b463703a726367b8e5bc3af6ab63c1 Mon Sep 17 00:00:00 2001 From: d3rpp Date: Sun, 25 Aug 2024 17:09:00 +1200 Subject: [PATCH] yeah --- src/hooks.server.ts | 3 ++- .../components/ui/avatar/avatar-fallback.svelte | 2 +- src/lib/components/ui/avatar/avatar-image.svelte | 2 +- src/lib/components/ui/avatar/avatar.svelte | 2 +- src/lib/components/ui/button/button.svelte | 4 ++-- src/lib/components/ui/card/card-content.svelte | 2 +- .../components/ui/card/card-description.svelte | 2 +- src/lib/components/ui/card/card-footer.svelte | 2 +- src/lib/components/ui/card/card-header.svelte | 2 +- src/lib/components/ui/card/card-title.svelte | 2 +- src/lib/components/ui/card/card.svelte | 2 +- .../dropdown-menu-checkbox-item.svelte | 2 +- .../dropdown-menu/dropdown-menu-content.svelte | 2 +- .../ui/dropdown-menu/dropdown-menu-item.svelte | 2 +- .../ui/dropdown-menu/dropdown-menu-label.svelte | 2 +- .../dropdown-menu-radio-item.svelte | 2 +- .../dropdown-menu/dropdown-menu-separator.svelte | 2 +- .../dropdown-menu/dropdown-menu-shortcut.svelte | 2 +- .../dropdown-menu-sub-content.svelte | 2 +- .../dropdown-menu-sub-trigger.svelte | 2 +- src/lib/components/ui/input/input-file.svelte | 2 +- src/lib/components/ui/input/input.svelte | 2 +- src/lib/components/ui/label/label.svelte | 2 +- src/lib/components/ui/separator/separator.svelte | 2 +- .../components/ui/tooltip/tooltip-content.svelte | 2 +- src/lib/server/db.ts | 4 +++- src/lib/trpc/client.ts | 16 +++++++++++++++- src/routes/(app)/app/+page.svelte | 11 ++++++++++- src/routes/(app)/app/account/+page.ts | 10 ++++++---- src/routes/(auth)/auth/sign-up/+page.svelte | 1 - src/routes/+layout.svelte | 2 +- 31 files changed, 62 insertions(+), 35 deletions(-) diff --git a/src/hooks.server.ts b/src/hooks.server.ts index ad8fbf1..32cdc4e 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -2,6 +2,7 @@ import { lucia } from "$lib/server/auth/adapter"; import { authHook } from "$lib/server/auth/hook"; import { createContext } from "$lib/server/trpc/context"; import { router } from "$lib/server/trpc/router"; +import { TRPC_PATH } from "$lib/trpc/client"; import type { Handle } from "@sveltejs/kit"; import { sequence } from "@sveltejs/kit/hooks"; @@ -17,5 +18,5 @@ setInterval(() => { export const handle: Handle = sequence( authHook, - createTRPCHandle({ router, createContext }), + createTRPCHandle({ router, createContext, url: TRPC_PATH }), ); diff --git a/src/lib/components/ui/avatar/avatar-fallback.svelte b/src/lib/components/ui/avatar/avatar-fallback.svelte index c4d4569..f4fda20 100644 --- a/src/lib/components/ui/avatar/avatar-fallback.svelte +++ b/src/lib/components/ui/avatar/avatar-fallback.svelte @@ -1,6 +1,6 @@ diff --git a/src/routes/(app)/app/account/+page.ts b/src/routes/(app)/app/account/+page.ts index 42328df..605114d 100644 --- a/src/routes/(app)/app/account/+page.ts +++ b/src/routes/(app)/app/account/+page.ts @@ -6,9 +6,11 @@ export const load = (async (event) => { const client = trpc(event, queryClient); return { - uploadedFileCount: - await client.user.getUploadedFiles.createServerQuery(undefined, { - ssr: false - }), + uploadedFileCount: await client.user.getUploadedFiles.createServerQuery( + undefined, + { + ssr: false, + }, + ), }; }) satisfies PageLoad; diff --git a/src/routes/(auth)/auth/sign-up/+page.svelte b/src/routes/(auth)/auth/sign-up/+page.svelte index b44d9b1..7d76775 100644 --- a/src/routes/(auth)/auth/sign-up/+page.svelte +++ b/src/routes/(auth)/auth/sign-up/+page.svelte @@ -61,7 +61,6 @@ */ const username_invalid_error_text: Readable = derived_store(username_availability_query, (val) => { - console.log(val.data); if (val.data && val.data.available === false) return "Username is Taken"; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 11ffb24..cf85c6b 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -27,7 +27,7 @@ - + {@render children()}