diff --git a/app/layout.tsx b/app/layout.tsx index a38b174..1e87a09 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,7 +1,8 @@ +import { ThemeProvider } from '@/components/theme-provider'; import { cn } from '@/lib/utils'; import { NextIntlClientProvider } from 'next-intl'; -import { getLocale, getMessages } from 'next-intl/server'; import './globals.css'; +import { getLocale, getMessages } from 'next-intl/server'; import { Inter } from 'next/font/google'; const inter = Inter({ subsets: ['latin', 'cyrillic'] }); @@ -21,7 +22,17 @@ export default async function RootLayout({ children }: { readonly children: Reac 'mx-auto min-h-screen max-w-2xl bg-background px-6 py-12 antialiased sm:py-24', )} > - {children} + + + {children} + + ); diff --git a/app/page.tsx b/app/page.tsx index 6f4d0b5..1b15f83 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -23,7 +23,7 @@ export async function generateMetadata({ params: { locale } }: Parameters): Prom export default function HomePage() { return ( -
+
diff --git a/components/theme-provider.tsx b/components/theme-provider.tsx new file mode 100644 index 0000000..4478109 --- /dev/null +++ b/components/theme-provider.tsx @@ -0,0 +1,11 @@ +'use client'; + +import { ThemeProvider as NextThemesProvider } from 'next-themes'; +import { type ComponentProps } from 'react'; + +export function ThemeProvider({ + children, + ...props +}: Readonly>) { + return {children}; +} diff --git a/eslint.config.mjs b/eslint.config.mjs index 97a6218..fe4bbb3 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -11,6 +11,7 @@ export default [ ignores: ['**/.next/**'], rules: { '@next/next/no-duplicate-head': 'off', + 'canonical/filename-match-regex': 0, 'import/extensions': [ 'error', 'never', diff --git a/package.json b/package.json index 47e70c4..faee970 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "lucide-react": "^0.468.0", "next": "15.0.4", "next-intl": "^3.26.0", + "next-themes": "^0.4.4", "react": "^19.0.0", "react-dom": "^19.0.0", "sharp": "^0.33.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 56f0414..e6e0c2a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ importers: next-intl: specifier: ^3.26.0 version: 3.26.0(next@15.0.4(@babel/core@7.25.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) + next-themes: + specifier: ^0.4.4 + version: 0.4.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: specifier: ^19.0.0 version: 19.0.0 @@ -2686,6 +2689,12 @@ packages: next: ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 react: ^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0 + next-themes@0.4.4: + resolution: {integrity: sha512-LDQ2qIOJF0VnuVrrMSMLrWGjRMkq+0mpgl6e0juCLqdJ+oo8Q84JRWT6Wh11VDQKkMMe+dVzDKLWs5n87T+PkQ==} + peerDependencies: + react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc + react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc + next@15.0.4: resolution: {integrity: sha512-nuy8FH6M1FG0lktGotamQDCXhh5hZ19Vo0ht1AOIQWrYJLP598TIUagKtvJrfJ5AGwB/WmDqkKaKhMpVifvGPA==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} @@ -6792,6 +6801,11 @@ snapshots: react: 19.0.0 use-intl: 3.26.0(react@19.0.0) + next-themes@0.4.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + dependencies: + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + next@15.0.4(@babel/core@7.25.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: '@next/env': 15.0.4