init repo

This commit is contained in:
JIANG
2025-09-09 10:01:21 +08:00
commit d70d1709d3
34 changed files with 13652 additions and 0 deletions

32
src/app/layout.tsx Normal file
View File

@@ -0,0 +1,32 @@
import type { Metadata } from "next";
import { cookies } from "next/headers";
import React, { Suspense } from "react";
import { RefineContext } from "./_refine_context";
export const metadata: Metadata = {
title: "Refine",
description: "Generated by create refine app",
icons: {
icon: "/favicon.ico",
},
};
export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const cookieStore = await cookies();
const theme = cookieStore.get("theme");
const defaultMode = theme?.value === "dark" ? "dark" : "light";
return (
<html lang="en">
<body>
<Suspense>
<RefineContext defaultMode={defaultMode}>{children}</RefineContext>
</Suspense>
</body>
</html>
);
}