사소한 리팩토링 2

This commit is contained in:
static
2025-12-26 15:45:03 +09:00
parent d94d14cf83
commit c9d4b10356
16 changed files with 54 additions and 84 deletions

View File

@@ -1,14 +1,13 @@
import { error } from "@sveltejs/kit";
import { useTRPC } from "$trpc/client";
import { trpc } from "$trpc/client";
import type { PageLoad } from "./$types";
export const load: PageLoad = async ({ fetch }) => {
const trpc = useTRPC(fetch);
try {
const { nickname } = await trpc.user.get.query();
const { nickname } = await trpc(fetch).user.get.query();
return { nickname };
} catch {
// TODO: Error Handling
error(500, "Internal server error");
}
};