2023-06-26 10:07:12 +00:00
|
|
|
import { ReactNode } from "react";
|
|
|
|
|
import { Metadata } from "next";
|
2023-06-28 09:09:45 +00:00
|
|
|
import "app/_styles/global.css";
|
2023-06-26 10:07:12 +00:00
|
|
|
import "@fontsource/poppins/400.css";
|
|
|
|
|
import "@fontsource/poppins/700.css";
|
|
|
|
|
import "@fontsource/roboto/400.css";
|
|
|
|
|
import "@fontsource/roboto/700.css";
|
|
|
|
|
import "@fontsource/playfair-display/900.css";
|
|
|
|
|
// import getConfig from "next/config";
|
|
|
|
|
// import { LicenseInfo } from "@mui/x-data-grid-pro";
|
|
|
|
|
import { MultiProvider } from "app/_components/MultiProvider";
|
|
|
|
|
import { InternalLayout } from "app/_components/InternalLayout";
|
2023-06-28 09:09:45 +00:00
|
|
|
import { headers } from 'next/headers'
|
2023-06-26 10:07:12 +00:00
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
|
title: "Leafcutter",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
type LayoutProps = {
|
|
|
|
|
children: ReactNode;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default function Layout({ children }: LayoutProps) {
|
2023-06-28 09:09:45 +00:00
|
|
|
const allHeaders = headers();
|
|
|
|
|
const embedded = Boolean(allHeaders.get('x-leafcutter-embedded'));
|
2023-06-26 10:07:12 +00:00
|
|
|
// const { publicRuntimeConfig } = getConfig();
|
|
|
|
|
// LicenseInfo.setLicenseKey(publicRuntimeConfig.muiLicenseKey);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<body>
|
|
|
|
|
<MultiProvider>
|
2023-06-28 09:09:45 +00:00
|
|
|
<InternalLayout embedded={embedded}>{children}</InternalLayout>
|
2023-06-26 10:07:12 +00:00
|
|
|
</MultiProvider>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
);
|
|
|
|
|
}
|