mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
fix: move back to old theming
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { ServerThemeProvider } from 'next-themes';
|
// import { ServerThemeProvider } from 'next-themes';
|
||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
|
import { Providers } from './providers';
|
||||||
|
|
||||||
import '@unocss/reset/tailwind.css';
|
import '@unocss/reset/tailwind.css';
|
||||||
import '../styles/inter.css';
|
import '../styles/inter.css';
|
||||||
@@ -9,19 +10,21 @@ import '../styles/main.css';
|
|||||||
|
|
||||||
export default function RootLayout({ children }: PropsWithChildren) {
|
export default function RootLayout({ children }: PropsWithChildren) {
|
||||||
return (
|
return (
|
||||||
<ServerThemeProvider
|
// <ServerThemeProvider
|
||||||
attribute="class"
|
// attribute="class"
|
||||||
defaultTheme="system"
|
// defaultTheme="system"
|
||||||
disableTransitionOnChange
|
// disableTransitionOnChange
|
||||||
value={{
|
// value={{
|
||||||
light: 'light',
|
// light: 'light',
|
||||||
dark: 'dark',
|
// dark: 'dark',
|
||||||
}}
|
// }}
|
||||||
>
|
// >
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head />
|
<head />
|
||||||
<body className="dark:bg-dark-800 bg-white">{children}</body>
|
<body className="dark:bg-dark-800 bg-white">
|
||||||
</html>
|
<Providers>{children}</Providers>
|
||||||
</ServerThemeProvider>
|
</body>
|
||||||
|
</html>
|
||||||
|
// </ServerThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
20
apps/website/src/app/providers.tsx
Normal file
20
apps/website/src/app/providers.tsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { ThemeProvider } from 'next-themes';
|
||||||
|
import type { PropsWithChildren } from 'react';
|
||||||
|
|
||||||
|
export function Providers({ children }: PropsWithChildren) {
|
||||||
|
return (
|
||||||
|
<ThemeProvider
|
||||||
|
attribute="class"
|
||||||
|
defaultTheme="system"
|
||||||
|
disableTransitionOnChange
|
||||||
|
value={{
|
||||||
|
light: 'light',
|
||||||
|
dark: 'dark',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</ThemeProvider>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user