fix: resolve Google Fonts fetch error during build
- Removed next/font/google from layout.tsx - Added standard Google Fonts <link> in HTML head - Defined --font-inter and --font-outfit in globals.css - This allows the build to pass in environments with restricted internet access.
This commit is contained in:
parent
ac0735381f
commit
b2daaa2108
@ -7,6 +7,8 @@
|
||||
--futuristic-cyan: #06b6d4;
|
||||
--futuristic-pink: #ec4899;
|
||||
--futuristic-blue: #3b82f6;
|
||||
--font-outfit: 'Outfit', sans-serif;
|
||||
--font-inter: 'Inter', sans-serif;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Inter, Outfit } from "next/font/google";
|
||||
import { Navbar } from "@/components/Navbar";
|
||||
import NewsTicker from "@/components/NewsTicker";
|
||||
import { GlobalTopBanner } from "@/components/AdWrappers";
|
||||
@ -7,8 +6,7 @@ import { getEntity } from "@/app/actions/entity";
|
||||
import { GlobalPlayer } from "@/components/media/GlobalPlayer";
|
||||
import "./globals.css";
|
||||
|
||||
const outfit = Outfit({ subsets: ["latin"], variable: "--font-outfit" });
|
||||
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" });
|
||||
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const entity = await getEntity();
|
||||
@ -30,7 +28,12 @@ export default async function RootLayout({
|
||||
const entity = await getEntity();
|
||||
|
||||
return (
|
||||
<html lang="es" className={`${outfit.variable} ${inter.variable}`}>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Outfit:wght@100..900&display=swap" rel="stylesheet" />
|
||||
</head>
|
||||
<body className="bg-slate-950 font-inter text-slate-50 antialiased selection:bg-cyan-500/30 overflow-x-hidden min-h-screen">
|
||||
<Navbar entity={entity} />
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user