From 4bab591dc1a0a495781d56b8051b4d4d80e42f6c Mon Sep 17 00:00:00 2001 From: siddheshmorewdi Date: Fri, 21 Jun 2024 17:05:44 +0530 Subject: [PATCH] final commit --- src/Components/Footer.jsx | 52 +++++++++++++++++++++++++++++++++------ src/Components/Header.jsx | 2 +- 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/Components/Footer.jsx b/src/Components/Footer.jsx index 8b69b54..2dcb406 100644 --- a/src/Components/Footer.jsx +++ b/src/Components/Footer.jsx @@ -1,12 +1,26 @@ import { Box, Container, Text } from "@chakra-ui/react"; import React from "react"; -import { Link } from "react-router-dom"; +import { Link, NavLink, useNavigate } from "react-router-dom"; import { IoLogoTwitter } from "react-icons/io5"; import { FaFacebookF } from "react-icons/fa6"; import { FaInstagram } from "react-icons/fa"; import { IoLogoGithub } from "react-icons/io"; +import { Link as ScrollLink, animateScroll as scroll } from "react-scroll"; const Footer = () => { + const navigate = useNavigate() + + + const handleNavClick = (path) => { + if (path === "aboutus") { + navigate(`/${path}`); + } else { + navigate("/"); + } + }; + + + return ( { Company - + scroll.scrollToTop()}> Home {" "} - + handleNavClick("investment")}> Investment - - + + handleNavClick("how-it-works")}> How it works - - + + FAQ's diff --git a/src/Components/Header.jsx b/src/Components/Header.jsx index 2902205..33a8db5 100644 --- a/src/Components/Header.jsx +++ b/src/Components/Header.jsx @@ -114,7 +114,7 @@ const Header = () => { spy={true} smooth={true} offset={0} - duration={300} + duration={100} onClick={() => handleNavClick(path)} > {title}