More app directory refactoring

This commit is contained in:
Darren Clarke 2023-06-28 09:09:45 +00:00 committed by GitHub
parent b312a8c862
commit 8bbeaa25cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 903 additions and 899 deletions

View file

@ -1,16 +1,16 @@
import { ReactNode } from "react";
import { Metadata } from "next";
import "./_styles/global.css";
import "app/_styles/global.css";
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 "styles/global.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";
import { headers } from 'next/headers'
export const metadata: Metadata = {
title: "Leafcutter",
@ -21,6 +21,8 @@ type LayoutProps = {
};
export default function Layout({ children }: LayoutProps) {
const allHeaders = headers();
const embedded = Boolean(allHeaders.get('x-leafcutter-embedded'));
// const { publicRuntimeConfig } = getConfig();
// LicenseInfo.setLicenseKey(publicRuntimeConfig.muiLicenseKey);
@ -28,7 +30,7 @@ export default function Layout({ children }: LayoutProps) {
<html lang="en">
<body>
<MultiProvider>
<InternalLayout>{children}</InternalLayout>
<InternalLayout embedded={embedded}>{children}</InternalLayout>
</MultiProvider>
</body>
</html>