fix: theme-color
This commit is contained in:
1 parent
585094dd24
commit
7f77f960d9
4 files changed
+11
-11
No files matched your search
+8
-9
@@ -1,5 +1,5 @@
|
||||
import React, { ReactNode } from 'react';
|
||||
import type { Metadata, Viewport } from 'next';
|
||||
import type { Metadata } from 'next';
|
||||
import { cookies } from 'next/headers';
|
||||
|
||||
import Header from '@/components/Header';
|
||||
@@ -12,19 +12,18 @@ export const metadata: Metadata = {
|
||||
description: 'It is going to help you find a movie for evening'
|
||||
};
|
||||
|
||||
export const viewport: Viewport = {
|
||||
themeColor: 'black',
|
||||
width: 'device-width',
|
||||
initialScale: 1,
|
||||
maximumScale: 1,
|
||||
userScalable: false
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
const theme = cookies().get('theme')?.value as Theme;
|
||||
|
||||
return (
|
||||
<html lang='en' className={theme}>
|
||||
<head>
|
||||
<meta
|
||||
name='viewport'
|
||||
content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'
|
||||
></meta>
|
||||
<meta name='theme-color' content='black'></meta>
|
||||
</head>
|
||||
<body>
|
||||
<Providers theme={theme}>
|
||||
<Header />
|
||||
|
||||
Reference in new issue
Block a user