Files
forex-dashboard/app/layout.tsx
T
caty21 886a5b426f fix: force-dynamic on all API routes + PWA manifest & service worker
- Add export const dynamic = "force-dynamic" to routes previously
  pre-rendered as static (rate-probabilities, news, fx, yields, calendar)
  → fixes empty data on Vercel where static pre-render got HTTP 403
- Add PWA: manifest.json, sw.js, icons, layout meta + apple-touch-icon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 15:19:35 +02:00

37 lines
990 B
TypeScript

import type { Metadata, Viewport } from "next";
import "./globals.css";
import Script from "next/script";
export const metadata: Metadata = {
title: "Forex Macro Dashboard",
description: "Tableau de bord macroéconomique Forex — 8 devises majeures",
manifest: "/manifest.json",
appleWebApp: {
capable: true,
statusBarStyle: "black-translucent",
title: "FX Dashboard",
},
};
export const viewport: Viewport = {
themeColor: "#090e1a",
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="fr">
<head>
<link rel="apple-touch-icon" href="/icons/icon-192.svg" />
</head>
<body className="min-h-screen bg-[#090e1a]">
{children}
<Script id="sw-register" strategy="afterInteractive">
{`if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js').catch(() => {});
}`}
</Script>
</body>
</html>
);
}