11import type { Metadata , Viewport } from "next" ;
22import { Inter } from "next/font/google" ;
3+ import Script from "next/script" ;
34import Header from "@/components/header" ;
5+ import Footer from "@/components/footer" ;
46
57import 'react-loading-skeleton/dist/skeleton.css' ;
6- import Footer from "@/components/footer" ;
78
89const inter = Inter ( { subsets : [ "latin" ] } ) ;
910
@@ -19,24 +20,17 @@ export const viewport: Viewport = {
1920 width : 'device-width' ,
2021} ;
2122
22- export default async function RootLayout ( {
23+ export default function RootLayout ( {
2324 children,
2425} : Readonly < {
2526 children : React . ReactNode ;
2627} > ) {
27-
2828 return (
2929 < html lang = "en" >
3030 < head >
31- < script
32- src = 'https://cdn.jsdelivr.net/npm/[email protected] /dist/js/bootstrap.bundle.min.js' 33- integrity = 'sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM'
34- crossOrigin = 'anonymous'
35- defer
36- />
3731 < link rel = 'preconnect' href = 'https://fonts.gstatic.com' />
3832 < link
39- href = 'https://fonts.googleapis.com/css?family=Inter& display=swap'
33+ href = 'https://fonts.googleapis.com/css?family=Inter& display = swap '
4034 rel = 'stylesheet'
4135 />
4236 < link
@@ -52,30 +46,22 @@ export default async function RootLayout({
5246 integrity = 'sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC'
5347 crossOrigin = 'anonymous'
5448 />
55- < link
56- rel = 'stylesheet'
57- href = "/styles/globals.css"
58- />
59- < link
60- rel = 'stylesheet'
61- href = "/styles/style.css"
62- />
63- < link
64- rel = 'stylesheet'
65- href = "/styles/third-party.css"
66- />
67-
49+ < link rel = 'stylesheet' href = "/styles/globals.css" />
50+ < link rel = 'stylesheet' href = "/styles/style.css" />
51+ < link rel = 'stylesheet' href = "/styles/third-party.css" />
6852 </ head >
69- < body >
70- < >
71- < Header />
72- < main className = 'mainClass mt-5' >
73- < >
74- { children }
75- </ >
76- </ main >
77- </ >
53+ < body className = { inter . className } >
54+ < Header />
55+ < main className = 'mainClass mt-5' >
56+ { children }
57+ </ main >
7858 < Footer />
59+ < Script
60+ src = 'https://cdn.jsdelivr.net/npm/[email protected] /dist/js/bootstrap.bundle.min.js' 61+ integrity = 'sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM'
62+ crossOrigin = 'anonymous'
63+ strategy = "lazyOnload"
64+ />
7965 </ body >
8066 </ html >
8167 ) ;
0 commit comments