update fix

This commit is contained in:
2025-12-19 11:32:50 +07:00
parent 47f154b326
commit e8d0ee3452
8 changed files with 67 additions and 43 deletions

37
src/app/(size)/layout.tsx Normal file
View File

@@ -0,0 +1,37 @@
'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>
);
}