feat: add clerk integration to remix-template

This commit is contained in:
afiqzudinhadi 2025-06-23 14:36:45 +08:00
parent e70d4d34c2
commit da8aaa1db6
4 changed files with 300 additions and 1 deletions

View file

@ -6,9 +6,15 @@ import {
ScrollRestoration,
} from "@remix-run/react";
import { Analytics } from "@vercel/analytics/react";
import "@repo/ui/styles/styles.css";
import "@repo/ui/styles/global.css";
import type { LoaderFunction } from "@remix-run/node";
import { rootAuthLoader } from "@clerk/remix/ssr.server";
import { ClerkApp } from "@clerk/remix";
export const loader: LoaderFunction = (args) => rootAuthLoader(args);
export function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
@ -31,6 +37,8 @@ export function Layout({ children }: { children: React.ReactNode }) {
);
}
export default function App() {
export function App() {
return <Outlet />;
}
export default ClerkApp(App);