NEXT_PUBLIC environnement variable values are set at build time and not run time. Build is currently performed in Github actions so setting those vars at runtime has no effect. We can use a package to automatically pass those variables at runtime
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
import { Metadata } from 'next';
|
|
import { Gabarito, Inter } from 'next/font/google';
|
|
import { PublicEnvScript } from 'next-runtime-env';
|
|
|
|
import { AppHeader } from '@/app/_components/ui/layout/header';
|
|
|
|
import { FooterDesktop } from './_components/ui/layout/FooterDesktop';
|
|
import EmotionRootStyleRegistry from './emotion-root-style-registry';
|
|
|
|
import './layout.css';
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Twenty.com',
|
|
description: 'Open Source CRM',
|
|
icons: '/images/core/logo.svg',
|
|
};
|
|
|
|
const gabarito = Gabarito({
|
|
weight: ['400', '500', '600', '700'],
|
|
subsets: ['latin'],
|
|
display: 'swap',
|
|
adjustFontFallback: false,
|
|
variable: '--font-gabarito',
|
|
});
|
|
|
|
const inter = Inter({
|
|
weight: ['400', '500', '600', '700'],
|
|
subsets: ['latin'],
|
|
display: 'swap',
|
|
adjustFontFallback: false,
|
|
variable: '--font-inter',
|
|
});
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<html lang="en" className={`${gabarito.variable} ${inter.variable}`}>
|
|
<body>
|
|
<PublicEnvScript />
|
|
<EmotionRootStyleRegistry>
|
|
<AppHeader />
|
|
<div className="container">{children}</div>
|
|
<FooterDesktop />
|
|
</EmotionRootStyleRegistry>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|