diff --git a/src/app/page.tsx b/src/app/page.tsx index 37629a1..bbf1611 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -4,6 +4,7 @@ import { HydrateClient } from "~/trpc/server"; import FileGrid from "~/app/_components/FileGrid"; import UploadForm from "~/app/_components/UploadForm"; import { Toaster } from "react-hot-toast"; +import { signIn, signOut } from "next-auth/react"; export default async function Home() { const session = await auth(); @@ -42,14 +43,12 @@ export default async function Home() { )} {!session?.user && (
-
- - {session ? "Sign out" : "Sign in"} - -
+
)} diff --git a/src/components/Auth.tsx b/src/components/Auth.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/trpc/server.ts b/src/trpc/server.ts index 9e72cbe..3f4a52f 100644 --- a/src/trpc/server.ts +++ b/src/trpc/server.ts @@ -8,6 +8,7 @@ import { createCaller, type AppRouter } from "~/server/api/root"; import { createTRPCContext } from "~/server/api/trpc"; import { createQueryClient } from "./query-client"; + /** * This wraps the `createTRPCContext` helper and provides the required context for the tRPC API when * handling a tRPC call from a React Server Component.