mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-23 15:08:12 +02:00
fix(build): supprime la dépendance réseau à Google Fonts au build + rend /commandes-auto dynamique
Le build Docker échouait sur le fetch de la police Inter via next/font/google (accès réseau/TLS indisponible pendant 'next build'). - layout.tsx : charge Inter via <link> côté navigateur (plus de fetch au build), avec fallback système ; --font-sans défini dans globals.css (@theme). - /commandes-auto : export dynamic = 'force-dynamic' (données live DB + API, jamais prérendues au build). - listCadences : résilient si la DB est injoignable (retourne []).
This commit is contained in:
4 files changed
+35
-15
No files matched your search
+13
-11
@@ -1,21 +1,12 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import { ThemeProvider } from "@/components/shared/theme-provider";
|
||||
import "./globals.css";
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ["latin"],
|
||||
variable: "--font-sans",
|
||||
display: "swap",
|
||||
});
|
||||
import { Providers } from "./providers";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "CollectFlow — Dashboard Décisionnel",
|
||||
description: "Révision d'Assortiment Haute Performance",
|
||||
};
|
||||
|
||||
import { Providers } from "./providers";
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
@@ -23,7 +14,18 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="fr" suppressHydrationWarning>
|
||||
<body className={`${inter.variable} font-sans antialiased`}>
|
||||
<head>
|
||||
{/* Inter chargé côté navigateur (et non au build) pour éviter toute
|
||||
dépendance réseau à Google Fonts pendant `next build` (Docker). */}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
|
||||
{/* eslint-disable-next-line @next/next/no-page-custom-font */}
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</head>
|
||||
<body className="font-sans antialiased">
|
||||
<Providers>
|
||||
{children}
|
||||
</Providers>
|
||||
|
||||
Reference in new issue
Block a user