fix: theme-color
This commit is contained in:
1 parent
585094dd24
commit
7f77f960d9
4 files changed
+11
-11
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { Loader } from 'lucide-react';
|
||||
|
||||
export default function Loading() {
|
||||
return (
|
||||
<div className='w-full min-h-[70vh] flex items-center justify-center'>
|
||||
|
||||
+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 />
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function Navigation() {
|
||||
{ path: '/top', title: 'Top rated' },
|
||||
{ path: '/favorites', title: 'Favorites' }
|
||||
].map(({ path, title }) => (
|
||||
<Link href={path} className='w-full' key={path}>
|
||||
<Link href={path} className='w-full' key={path} shallow>
|
||||
<TabsTrigger className='w-full' value={path}>
|
||||
{title}
|
||||
</TabsTrigger>
|
||||
|
||||
@@ -11,7 +11,7 @@ const Header: FC = () => (
|
||||
<header className='flex justify-center bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 sticky pt-2 pb-2 top-0 z-10'>
|
||||
<div className='max-w-[1260px] w-full px-[12px]'>
|
||||
<div className='flex items-center justify-between gap-2 flex-wrap md:flex-nowrap'>
|
||||
<Link href='/'>
|
||||
<Link href='/' shallow>
|
||||
<Badge className='whitespace-nowrap'>Movie advisor</Badge>
|
||||
</Link>
|
||||
<div className='w-full order-3 md:order-none'>
|
||||
|
||||
Reference in new issue
Block a user