mirror of
https://github.com/supabase/supabase.git
synced 2026-05-06 14:05:05 +08:00
This PR fixes a bug where a user might choose `classic-dark` as a theme in `studio` but then `docs` and `marketing` apps will look weird. To test: - Change the localStorage value of `theme` to `classic-dark` - Open `www` and `docs` apps, they should look ok <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a new "classic-dark" theme option for enhanced visual customization. * **Improvements** * Unified and simplified theme handling across apps for more consistent behavior. * Improved system-theme detection and smoother transitions when switching themes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
59 lines
1.5 KiB
TypeScript
59 lines
1.5 KiB
TypeScript
import type { Metadata } from 'next'
|
|
|
|
import '@/styles/globals.css'
|
|
|
|
import { FeatureFlagProvider, TelemetryTagManager } from 'common'
|
|
import { genFaviconData } from 'common/MetaFavicons/app-router'
|
|
import { Inter } from 'next/font/google'
|
|
|
|
import { Providers } from './Providers'
|
|
import { Toaster } from './toaster'
|
|
import { API_URL } from '@/lib/constants'
|
|
|
|
const inter = Inter({ subsets: ['latin'] })
|
|
|
|
const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH ?? ''
|
|
|
|
export const metadata: Metadata = {
|
|
applicationName: 'Learn Supabase',
|
|
title: 'Learn Supabase',
|
|
description: 'Learn Supabase.',
|
|
metadataBase: new URL('https://supabase.com/learn'),
|
|
icons: genFaviconData(BASE_PATH),
|
|
openGraph: {
|
|
type: 'article',
|
|
authors: 'Supabase',
|
|
url: `${BASE_PATH}`,
|
|
images: `${BASE_PATH}/img/supabase-og-image.png`,
|
|
publishedTime: new Date().toISOString(),
|
|
modifiedTime: new Date().toISOString(),
|
|
},
|
|
twitter: {
|
|
card: 'summary_large_image',
|
|
site: '@supabase',
|
|
creator: '@supabase',
|
|
images: `${BASE_PATH}/img/supabase-og-image.png`,
|
|
},
|
|
}
|
|
|
|
interface RootLayoutProps {
|
|
children: React.ReactNode
|
|
}
|
|
|
|
export default async function Layout({ children }: RootLayoutProps) {
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<head />
|
|
<body className={`${inter.className} antialiased`}>
|
|
<TelemetryTagManager />
|
|
<FeatureFlagProvider API_URL={API_URL}>
|
|
<Providers>
|
|
{children}
|
|
<Toaster />
|
|
</Providers>
|
|
</FeatureFlagProvider>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|