diff --git a/apps/climatemappedafrica/src/components/Footer/index.js b/apps/climatemappedafrica/src/components/Footer/index.js
deleted file mode 100644
index ce8464e68..000000000
--- a/apps/climatemappedafrica/src/components/Footer/index.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/* eslint-disable react/default-props-match-prop-types */
-
-import {
- StayInTouch,
- QuickLinks,
- RichTypography,
- LogoButton,
- Copyright,
-} from "@commons-ui/core";
-import { Grid } from "@mui/material";
-import PropTypes from "prop-types";
-import React from "react";
-
-import useStyles from "./useStyles";
-
-import Link from "@/climatemappedafrica/components/Link";
-import Section from "@/climatemappedafrica/components/Section";
-
-function Footer({
- title,
- logoProps,
- aboutVariant,
- description,
- copyrightProps,
- quickLinks: quickLinksProp,
- socialMedia,
- ...props
-}) {
- const classes = useStyles(props);
- return (
-
-
-
-
- {logoProps && (
-
- )}
-
-
- {description && (
-
- {description}
-
- )}
- {copyrightProps && (
-
- )}
-
-
-
-
- {quickLinksProp && (
-
- )}
-
-
- {socialMedia && (
-
- )}
-
-
-
-
-
-
- );
-}
-
-Footer.propTypes = {
- title: PropTypes.string,
- description: PropTypes.string,
- socialMedia: PropTypes.arrayOf(PropTypes.shape({})),
- quickLinks: PropTypes.PropTypes.shape({}),
- logoProps: PropTypes.shape({
- src: PropTypes.string,
- alt: PropTypes.string,
- href: PropTypes.string,
- }),
- aboutVariant: PropTypes.string,
- copyrightProps: PropTypes.shape({}),
-};
-
-Footer.defaultProps = {
- title: undefined,
- description: undefined,
- socialMedia: undefined,
- quickLinks: undefined,
- copyrightProps: undefined,
- logoProps: undefined,
- aboutVariant: "subtitle1",
-};
-
-export default Footer;
diff --git a/apps/climatemappedafrica/src/components/Footer/index.stories.js b/apps/climatemappedafrica/src/components/Footer/index.stories.js
deleted file mode 100644
index fe046015d..000000000
--- a/apps/climatemappedafrica/src/components/Footer/index.stories.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* eslint-disable import/no-anonymous-default-export */
-import React from "react";
-
-import Footer from ".";
-
-import { footerArgs } from "@/climatemappedafrica/config";
-
-export default {
- title: "Sections/Footer",
- argTypes: {
- title: {
- control: {
- type: "text",
- },
- },
- socialMedia: {
- control: {
- type: "object",
- },
- },
- quickLinks: {
- control: {
- type: "array",
- },
- },
- description: {
- control: {
- type: "text",
- },
- },
- aboutVariant: {
- control: {
- type: "select",
- },
- options: ["subtitle1", "body1"],
- },
- copyrightProps: {
- control: {
- type: "object",
- },
- },
- logoProps: {
- control: {
- type: "object",
- },
- },
- },
-};
-
-function Template({ ...args }) {
- return ;
-}
-
-export const Default = Template.bind({});
-
-Default.parameters = {
- nextRouter: {
- pathname: "/?path=/story/sections-footer--default",
- },
-};
-
-Default.args = {
- ...footerArgs,
-};
diff --git a/apps/climatemappedafrica/src/components/Footer/useStyles.js b/apps/climatemappedafrica/src/components/Footer/useStyles.js
deleted file mode 100644
index 603fb2cc9..000000000
--- a/apps/climatemappedafrica/src/components/Footer/useStyles.js
+++ /dev/null
@@ -1,128 +0,0 @@
-import makeStyles from "@mui/styles/makeStyles";
-
-const useStyles = makeStyles(({ breakpoints, palette, typography }) => ({
- root: {
- background: palette.grey.dark,
- height: "auto",
- padding: `${typography.pxToRem(80)} 0`,
- [breakpoints.up("md")]: {
- paddingTop: `${typography.pxToRem(58)}`,
- paddingBottom: `${typography.pxToRem(82)}`,
- },
- },
- section: {},
- logoButton: {
- margin: "0 auto",
- padding: 0,
- [breakpoints.up("lg")]: {
- margin: 0,
- },
- },
- allLinks: {
- margin: "0 auto",
- flexDirection: "row",
- justifyContent: "center",
- marginTop: typography.pxToRem(44.19),
- },
- stayInTouch: {
- display: "flex",
- flexDirection: "column",
- alignItems: "center",
- letterspacing: typography.pxToRem(0.7),
- [breakpoints.up("lg")]: {
- alignItems: "flex-start",
- },
- },
- stayInTouchIcon: {
- height: "auto",
- objectFit: "none",
- display: "flex",
- width: "auto",
- },
- stayInTouchText: {
- color: palette.text.secondary,
- fontSize: typography.subtitle2.fontSize,
- fontWeight: "bold",
- padding: `${typography.pxToRem(10)} ${typography.pxToRem(8)}`,
- [breakpoints.up("lg")]: {
- padding: 0,
- },
- },
- stayInTouchLink: {
- padding: 0,
- },
- stayInTouchLinks: {
- justifyContent: "center",
- marginLeft: typography.pxToRem(-14), // (48 - 20) / 2
- marginTop: typography.pxToRem(24),
- "& > a": {
- height: typography.pxToRem(48),
- width: typography.pxToRem(48),
- borderRight: "none",
- display: "flex",
- justifyContent: "center",
- },
- },
- quickLinkRoot: {
- textAlign: "center",
- padding: `${typography.pxToRem(32)} 0 `,
- [breakpoints.up("lg")]: {
- textAlign: "inherit",
- padding: 0,
- },
- },
- quickList: {
- listStyle: "none",
- color: palette.text.secondary,
- padding: 0,
- letterspacing: typography.pxToRem(0.7),
- "& > li": {
- marginTop: typography.pxToRem(16),
- },
- },
- quickLink: {
- fontSize: typography.subtitle1.fontSize,
- color: palette.text.secondary,
- fontWeight: "normal",
- "&:hover": {
- color: palette.primary.light,
- },
- },
- quickLinksTitle: {
- color: palette.text.secondary,
- fontSize: typography.subtitle2.fontSize,
- fontWeight: "bold",
- },
- description: {
- color: palette.text.secondary,
- padding: `${typography.pxToRem(32)} 0`,
- fontSize: typography.subtitle1.fontSize,
- textAlign: "center",
- [breakpoints.up("lg")]: {
- textAlign: "left",
- },
- },
- copyright: {
- margin: 0,
- display: "flex",
- flexWrap: "wrap",
- flexDirection: "row",
- justifyContent: "center",
- [breakpoints.up("lg")]: {
- justifyContent: "flex-start",
- },
- "& > a": {
- marginTop: typography.pxToRem(3),
- },
- },
- copyrightText: {
- color: palette.text.secondary,
- order: 5,
- padding: `0 ${typography.pxToRem(5)}`,
- [breakpoints.up("lg")]: {
- padding: `0 ${typography.pxToRem(10)}`,
- },
- },
-}));
-
-export default useStyles;
diff --git a/apps/climatemappedafrica/src/components/Page/Base.js b/apps/climatemappedafrica/src/components/Page/Base.js
index 870fd2dbf..a7e62d457 100644
--- a/apps/climatemappedafrica/src/components/Page/Base.js
+++ b/apps/climatemappedafrica/src/components/Page/Base.js
@@ -1,13 +1,9 @@
-import { useMediaQuery } from "@mui/material";
-import { useTheme } from "@mui/material/styles";
import { NextSeo } from "next-seo";
import PropTypes from "prop-types";
import React from "react";
-import Footer from "@/climatemappedafrica/components/Footer";
import Navigation from "@/climatemappedafrica/components/Navigation";
import { navigationArgs } from "@/climatemappedafrica/config";
-import getFooterMenu from "@/climatemappedafrica/functions/menus/getFooterMenu";
import getNavigationMenu from "@/climatemappedafrica/functions/menus/getNavigationMenu";
/**
@@ -15,13 +11,10 @@ import getNavigationMenu from "@/climatemappedafrica/functions/menus/getNavigati
*/
function BasePage({ children, menus, variant, post, ...props }) {
const seo = {};
- const footerProps = getFooterMenu(menus?.footerMenu || []);
const navigation = getNavigationMenu(menus?.primaryMenu || []);
const { menuProps, socialLinks } = navigation;
const { desktopLogoProps, mobileLogoProps, drawerLogoProps } = navigationArgs;
- const theme = useTheme();
- const isDesktop = useMediaQuery(theme.breakpoints.up("lg"));
const navigationProps = {
...props,
...menus,
@@ -60,7 +53,6 @@ function BasePage({ children, menus, variant, post, ...props }) {
noindex={seo?.metaRobotsNoindex !== "index"}
/>
{children}
- {!(variant === "explore" && isDesktop) && }
>
);
}
diff --git a/apps/climatemappedafrica/src/functions/menus/getFooterMenu.js b/apps/climatemappedafrica/src/functions/menus/getFooterMenu.js
deleted file mode 100644
index 12583b54a..000000000
--- a/apps/climatemappedafrica/src/functions/menus/getFooterMenu.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* eslint-disable no-shadow */
-export default function getFooterMenu(data) {
- const labels = data.map((item) => item.label?.toLowerCase());
- const logoProps = data
- .filter((item) => item?.label?.toLowerCase() === labels[0])
- .map(({ label, url, title, description }) => {
- return {
- src: url,
- alt: label?.toLowerCase(),
- href: title,
- description,
- };
- })[0];
- const copyrightProps = data
- .filter((item) => item?.label?.toLowerCase() === labels[1])
- .map(({ url, description, title }) => {
- return {
- icon: url,
- copyright: description,
- copyrightUrl: title,
- };
- })[0];
- const quickLinks = data
- .filter((item) => item?.label?.toLowerCase() === labels[2])
- .map(({ label, children }) => {
- return {
- title: label,
- links: children?.map(({ label, title }) => {
- return {
- label,
- href: title,
- };
- }),
- };
- })[0];
- const socialMedia = data
- .filter((item) => item?.label?.toLowerCase() === labels[3])
- .map(({ label, children }) => {
- const links = children?.map(({ label, url, description }) => {
- return {
- url,
- image: {
- url: description,
- alt: label?.toLowerCase(),
- },
- label,
- };
- });
- return {
- label,
- links,
- };
- })[0];
- return {
- logoProps,
- quickLinks,
- copyrightProps,
- title: socialMedia?.label,
- description: logoProps?.description,
- socialMedia: socialMedia?.links,
- };
-}