From f5491f3d2c97fc6de513e5924f222f7965535c79 Mon Sep 17 00:00:00 2001 From: priyankarpal <88102392+priyankarpal@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:21:00 +0530 Subject: [PATCH 1/2] chore: change to `scrollY` --- src/components/BackToTop.jsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/BackToTop.jsx b/src/components/BackToTop.jsx index d07fce4a..529aa0d9 100644 --- a/src/components/BackToTop.jsx +++ b/src/components/BackToTop.jsx @@ -12,7 +12,7 @@ const BackToTopButton = () => { } useEffect(() => { const toggleVisiblity = () => { - window.pageYOffset > 250 ? setBtnVisiblity(true) : setBtnVisiblity(false) + window.scrollY > 250 ? setBtnVisiblity(true) : setBtnVisiblity(false) } window.addEventListener('scroll', toggleVisiblity) return () => { @@ -21,12 +21,11 @@ const BackToTopButton = () => { }, []) return ( - -
+
+ >
From 6946c18339a112356b0293ccbb59bc70037a9b7f Mon Sep 17 00:00:00 2001 From: priyankarpal <88102392+priyankarpal@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:21:47 +0530 Subject: [PATCH 2/2] refactor: optimize footer code --- src/components/Footer.jsx | 107 +++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 59 deletions(-) diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index dbfcd2b7..46835a14 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -1,80 +1,68 @@ import freehitlogo from '../assets/footer-logo.webp' +import { NavLink } from "react-router-dom" import "../styles/Footer.css" + const Footer = () => { - // gettin year dynamically + // getting year dynamically const date = new Date(); const year = date.getFullYear(); + + // to add social links + const socialLinks = [ + { + label: 'Twitter', + iconClass: 'socials_twitter ri-twitter-fill', + url: 'https://twitter.com/_Jason_Dsouza', + }, + { + label: 'GitHub', + iconClass: 'socials_github ri-github-fill', + url: 'https://github.com/JasonDsouza212', + }, + { + label: 'LinkedIn', + iconClass: 'socials_linkedin ri-linkedin-fill', + url: 'https://www.linkedin.com/in/jason-dsouza-130b421ba/', + }, + { + label: 'Email', + iconClass: 'socials_mail ri-mail-fill', + url: 'mailto:jasondsouza212@gmail.com', + }, + ]; return ( + ) }