From e0938b8938f08f8e37c07bf54f8623a73661e4e5 Mon Sep 17 00:00:00 2001 From: prajjawal05 <prajjawalagarwal@gmail.com> Date: Sun, 27 Aug 2023 03:05:02 -0400 Subject: [PATCH] removed footer from mobile --- src/components/InfoFooter/index.js | 20 +++++++++++++------- src/components/Skills/index.js | 2 -- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/components/InfoFooter/index.js b/src/components/InfoFooter/index.js index 36e0d1b..6f75f51 100644 --- a/src/components/InfoFooter/index.js +++ b/src/components/InfoFooter/index.js @@ -1,7 +1,9 @@ +import { useContext } from 'react'; import { Layout as AntLayout, Typography } from 'antd'; import styled from 'styled-components'; import { LINKS } from '../../config/links'; +import { ScreenContext } from "../../config/context"; const { Text } = Typography; const { Footer: AntFooter } = AntLayout; @@ -21,12 +23,16 @@ const Email = () => ( rel="noopener noreferrer">here</a> ); -const Footer = () => ( - <StyledFooter style={{ position: 'sticky', bottom: 0, zIndex: 1, width: '100%', height: '50px', paddingTop: '15px' }}> - <Text> - Email me <Email /> - </Text> - </StyledFooter> -); +const Footer = () => { + const width = useContext(ScreenContext); + const isMobile = width < 700; + return !isMobile && ( + <StyledFooter style={{ position: 'sticky', bottom: 0, zIndex: 1, width: '100%', height: '50px', paddingTop: '15px' }}> + <Text> + Email me <Email /> + </Text> + </StyledFooter> + ) +}; export default Footer; \ No newline at end of file diff --git a/src/components/Skills/index.js b/src/components/Skills/index.js index 418d7e1..1bed46f 100644 --- a/src/components/Skills/index.js +++ b/src/components/Skills/index.js @@ -45,7 +45,5 @@ const Skills = () => ( export default Skills; -// menu active item -// change resume link // preview resume // resume download \ No newline at end of file