Update Link->Leafcutter integration
This commit is contained in:
parent
baa1b32737
commit
495e8338b9
31 changed files with 239 additions and 343 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { FC, PropsWithChildren } from "react";
|
||||
import getConfig from "next/config";
|
||||
import { Grid, Container } from "@mui/material";
|
||||
import CookieConsent from "react-cookie-consent";
|
||||
import { useCookies } from "react-cookie";
|
||||
|
|
@ -10,7 +11,13 @@ import { useAppContext } from "./AppProvider";
|
|||
|
||||
export const Layout: FC<PropsWithChildren> = ({ children }) => {
|
||||
const [cookies, setCookie] = useCookies(["cookieConsent"]);
|
||||
|
||||
const consentGranted = cookies.cookieConsent === "true";
|
||||
console.log({ val: process.env.LINK_EMBEDDED });
|
||||
const {
|
||||
publicRuntimeConfig: { embedded },
|
||||
} = getConfig();
|
||||
|
||||
const {
|
||||
colors: {
|
||||
white,
|
||||
|
|
@ -24,14 +31,18 @@ export const Layout: FC<PropsWithChildren> = ({ children }) => {
|
|||
return (
|
||||
<>
|
||||
<Grid container direction="column">
|
||||
<Grid item>
|
||||
<TopNav />
|
||||
</Grid>
|
||||
<Sidebar open />
|
||||
<Grid item sx={{ mt: "100px", ml: "310px" }}>
|
||||
{!embedded && (
|
||||
<Grid item>
|
||||
<TopNav />
|
||||
</Grid>
|
||||
)}
|
||||
{!embedded && <Sidebar open />}
|
||||
<Grid
|
||||
item
|
||||
sx={{ mt: embedded ? 0 : "100px", ml: embedded ? 0 : "310px" }}
|
||||
>
|
||||
<Container sx={{ padding: 2 }}>{children}</Container>
|
||||
</Grid>
|
||||
<Grid item>{/* <Footer /> */}</Grid>
|
||||
</Grid>
|
||||
{!consentGranted ? (
|
||||
<CookieConsent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue