38 lines
785 B
TypeScript
38 lines
785 B
TypeScript
|
|
'use client';
|
||
|
|
import { useState, useEffect } from 'react';
|
||
|
|
import '@styles/sf-pro-display.css';
|
||
|
|
import 'swiper/css';
|
||
|
|
import 'swiper/css/navigation';
|
||
|
|
import 'swiper/css/pagination';
|
||
|
|
import '@styles/globals.css';
|
||
|
|
import Header from '@components/layout/Header';
|
||
|
|
|
||
|
|
import PreLoader from '@components/Common/PreLoader';
|
||
|
|
|
||
|
|
export default function RootLayout({
|
||
|
|
children,
|
||
|
|
}: Readonly<{
|
||
|
|
children: React.ReactNode;
|
||
|
|
}>) {
|
||
|
|
const [loading, setLoading] = useState<boolean>(true);
|
||
|
|
|
||
|
|
useEffect(() => {
|
||
|
|
setTimeout(() => setLoading(false), 1000);
|
||
|
|
}, []);
|
||
|
|
|
||
|
|
return (
|
||
|
|
<html suppressHydrationWarning>
|
||
|
|
<body>
|
||
|
|
{loading ? (
|
||
|
|
<PreLoader />
|
||
|
|
) : (
|
||
|
|
<>
|
||
|
|
<Header />
|
||
|
|
{children}
|
||
|
|
</>
|
||
|
|
)}
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
);
|
||
|
|
}
|