Skip to content

Commit bce61f5

Browse files
FIX (fonts): Use Fonts from google fonts
1 parent a149c27 commit bce61f5

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

app/layout.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
import { Jost } from "next/font/google";
1+
/* eslint-disable @next/next/no-page-custom-font */
22
import "./globals.css";
33
import Script from "next/script";
44

5-
const jost = Jost({
6-
weight: ["400", "500", "600", "700", "800"],
7-
style: ["normal"],
8-
subsets: ["latin"],
9-
display: "swap",
10-
});
11-
125
export default function RootLayout({
136
children,
147
}: Readonly<{
@@ -17,6 +10,18 @@ export default function RootLayout({
1710
return (
1811
<html lang="en">
1912
<head>
13+
{/* Google Fonts Preconnect */}
14+
<link rel="preconnect" href="https://fonts.googleapis.com" />
15+
<link
16+
rel="preconnect"
17+
href="https://fonts.gstatic.com"
18+
crossOrigin="anonymous"
19+
/>
20+
<link
21+
href="https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700;800&display=swap"
22+
rel="stylesheet"
23+
/>
24+
2025
{/* DNS Prefetch & Preconnect for Analytics */}
2126
<link rel="dns-prefetch" href="https://www.googletagmanager.com" />
2227
<link rel="dns-prefetch" href="https://www.google-analytics.com" />
@@ -33,10 +38,7 @@ export default function RootLayout({
3338
/>
3439
</head>
3540

36-
<body
37-
className={jost.className}
38-
style={{ fontFamily: "Jost, sans-serif" }}
39-
>
41+
<body style={{ fontFamily: "Jost, sans-serif" }}>
4042
{children}
4143
<Script
4244
src="https://www.googletagmanager.com/gtag/js?id=G-GE01THYR9X"

0 commit comments

Comments
 (0)