Update Link->Leafcutter integration

This commit is contained in:
Darren Clarke 2023-05-25 12:37:14 +00:00
parent baa1b32737
commit 495e8338b9
31 changed files with 239 additions and 343 deletions

View file

@ -1,5 +1,5 @@
import { FC } from "react";
import Image from "next/image";
import Image from "next/legacy/image";
import { Grid, Box, GridSize } from "@mui/material";
import AboutDots from "images/about-dots.png";
import { useAppContext } from "./AppProvider";

View file

@ -1,5 +1,5 @@
import { FC } from "react";
import Image from "next/image";
import Image from "next/legacy/image";
import { signOut } from "next-auth/react";
import { Button, Box, Menu, MenuItem } from "@mui/material";
import { useTranslate } from "react-polyglot";

View file

@ -1,7 +1,7 @@
import { FC } from "react";
import { Container, Grid, Box, Button } from "@mui/material";
import { useTranslate } from "react-polyglot";
import Image from "next/image";
import Image from "next/legacy/image";
import Link from "next/link";
import leafcutterLogo from "images/leafcutter-logo.png";
import footerLogo from "images/footer-logo.png";

View file

@ -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

View file

@ -4,7 +4,7 @@ import AboutMenuIcon from "images/about-menu.png";
import TrendsMenuIcon from "images/trends-menu.png";
import SearchCreateMenuIcon from "images/search-create-menu.png";
import FAQMenuIcon from "images/faq-menu.png";
import Image from "next/image";
import Image from "next/legacy/image";
import {
Box,
Grid,

View file

@ -1,6 +1,6 @@
import { FC } from "react";
import Link from "next/link";
import Image from "next/image";
import Image from "next/legacy/image";
import { AppBar, Grid, Box } from "@mui/material";
import { useTranslate } from "react-polyglot";
import LeafcutterLogo from "images/leafcutter-logo.png";

View file

@ -1,5 +1,5 @@
import { FC } from "react";
import Image from "next/image";
import Image from "next/legacy/image";
import { Card, Grid } from "@mui/material";
import horizontalBar from "images/horizontal-bar.svg";
import horizontalBarStacked from "images/horizontal-bar-stacked.svg";