Use next-themes in theme provider for React frontends, and fix neon setup (#407)

Co-authored-by: Aman Varshney <amanvarshney.work@gmail.com>
This commit is contained in:
Anmol
2025-07-20 08:36:09 +04:00
committed by GitHub
parent b72a83f13a
commit 2b71ef246c
11 changed files with 88 additions and 173 deletions

View File

@@ -45,11 +45,11 @@ export const Route = createRootRouteWithContext<RouterAppContext>()({
head: () => ({
meta: [
{
title: "My App",
title: "{{projectName}}",
},
{
name: "description",
content: "My App is a web application",
content: "{{projectName}} is a web application",
},
],
links: [
@@ -75,7 +75,12 @@ function RootComponent() {
<>
<HeadContent />
{{#if (eq api "orpc")}}
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
<ThemeProvider
attribute="class"
defaultTheme="dark"
disableTransitionOnChange
storageKey="vite-ui-theme"
>
<div className="grid grid-rows-[auto_1fr] h-svh">
<Header />
{isFetching ? <Loader /> : <Outlet />}
@@ -83,7 +88,12 @@ function RootComponent() {
<Toaster richColors />
</ThemeProvider>
{{else}}
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
<ThemeProvider
attribute="class"
defaultTheme="dark"
disableTransitionOnChange
storageKey="vite-ui-theme"
>
<div className="grid grid-rows-[auto_1fr] h-svh">
<Header />
{isFetching ? <Loader /> : <Outlet />}