From 7d644f81711484f1dd2ed108120a996dd4aa13bf Mon Sep 17 00:00:00 2001 From: Kipruto <43873157+kelvinkipruto@users.noreply.github.com> Date: Fri, 18 Oct 2024 13:10:43 +0300 Subject: [PATCH] Fix footer display --- .../src/components/Footer/index.js | 172 +++++++++--------- 1 file changed, 90 insertions(+), 82 deletions(-) diff --git a/apps/climatemappedafrica/src/components/Footer/index.js b/apps/climatemappedafrica/src/components/Footer/index.js index 7da3df444..11e564b13 100644 --- a/apps/climatemappedafrica/src/components/Footer/index.js +++ b/apps/climatemappedafrica/src/components/Footer/index.js @@ -1,8 +1,7 @@ import { QuickLinks, LogoButton, Copyright } from "@commons-ui/core"; import { Link, StayInTouch } from "@commons-ui/next"; import { RichText } from "@commons-ui/payload"; -import { Grid, useMediaQuery } from "@mui/material"; -import { useTheme } from "@mui/material/styles"; +import { Box, Grid } from "@mui/material"; import React from "react"; import useStyles from "./useStyles"; @@ -20,96 +19,105 @@ function Footer(props) { } = props; const classes = useStyles(props); - const theme = useTheme(); - - const isDesktop = useMediaQuery(theme.breakpoints.up("lg")); return ( - !(variant === "explore" && isDesktop) && ( -
-
- - - {logoProps && ( - - )} - - - {description && ( - - )} - ({ + display: { + xs: "block", + lg: variant !== "explore" ? "block" : "none", + }, + background: theme.palette.grey.dark, + height: "auto", + padding: `${theme.typography.pxToRem(80)} 0`, + [theme.breakpoints.up("md")]: { + paddingTop: `${theme.typography.pxToRem(58)}`, + paddingBottom: `${theme.typography.pxToRem(82)}`, + }, + })} + > +
+ + + {logoProps && ( + - - - + + {description && ( + - - {links && ( - - )} - - - + )} + + + + + + {links && ( + - + )} + + + -
-
- ) + + + ); }