Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@radix-ui/react-toast": "^1.2.2",
"@radix-ui/react-tooltip": "^1.1.7",
"@replit/codemirror-lang-csharp": "^6.2.0",
"@stackframe/stack": "^2.7.21",
"@supabase/ssr": "^0.5.1",
"@supabase/supabase-js": "^2.45.5",
"@types/react-syntax-highlighter": "^15.5.13",
Expand Down
6 changes: 6 additions & 0 deletions apps/web/src/app/handler/[...stack]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { StackHandler } from "@stackframe/stack";
import { stackServerApp } from "../../../stack";

export default function Handler(props: unknown) {
return <StackHandler fullPage app={stackServerApp} routeProps={props} />;
}
4 changes: 3 additions & 1 deletion apps/web/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import type { Metadata } from "next";
import { StackProvider, StackTheme } from "@stackframe/stack";
import { stackServerApp } from "../stack";
import "./globals.css";
import { Inter } from "next/font/google";
import { cn } from "@/lib/utils";
Expand All @@ -19,7 +21,7 @@ export default function RootLayout({
}>) {
return (
<html lang="en" className="h-screen">
<body className={cn("min-h-full", inter.className)}>{children}</body>
<body className={cn("min-h-full", inter.className)}><StackProvider app={stackServerApp}><StackTheme>{children}</StackTheme></StackProvider></body>
</html>
);
}
5 changes: 5 additions & 0 deletions apps/web/src/app/loading.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function Loading() {
// Stack uses React Suspense, which will render this page while user data is being fetched.
// See: https://nextjs.org/docs/app/api-reference/file-conventions/loading
return <></>;
}
7 changes: 7 additions & 0 deletions apps/web/src/stack.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import "server-only";

import { StackServerApp } from "@stackframe/stack";

export const stackServerApp = new StackServerApp({
tokenStore: "nextjs-cookie",
});
Loading