diff --git a/src/Components/Hero/Hero.tsx b/src/Components/Hero/Hero.tsx index 2567c1e..604461c 100644 --- a/src/Components/Hero/Hero.tsx +++ b/src/Components/Hero/Hero.tsx @@ -1,41 +1,43 @@ -import React from "react"; import HeroImg from "../../assets/HeroImg.svg"; import Stars from "../../assets/Stars.svg"; -import { FaChevronDown } from "react-icons/fa"; const Hero = () => { return ( -
-
- hero +
+
+ hero
-
- hero -

GROW YOUR

-

BUSINESS

-
-

+
+
+ hero +
+

GROW YOUR

+

BUSINESS

+
+ heroSm +
+
+

We do all the digital footprint for you,

-

- so you can focus on what’s important! +

+ so you can focus on what's important!

-
-
-
- - - -

); }; diff --git a/src/Components/Navbar/Navbar.tsx b/src/Components/Navbar/Navbar.tsx index 9224b14..d13de4e 100644 --- a/src/Components/Navbar/Navbar.tsx +++ b/src/Components/Navbar/Navbar.tsx @@ -1,12 +1,14 @@ -import { useState } from "react"; -import { FaTimes, FaBars } from "react-icons/fa"; +import { useEffect, useState } from "react"; import Logo from "../../assets/logo.svg"; export default () => { const [state, setState] = useState(false); - const [colorChange, setColorChange] = useState(false); + const [isNavbarCollapsed, setIsNavbarCollapsed] = useState( + window.innerWidth <= 768 + ); + const changeColor = () => { if (window.scrollY >= 100) { setColorChange(true); @@ -15,41 +17,51 @@ export default () => { } }; - window.addEventListener("scroll", changeColor); + const checkNavbarCollapse = () => { + if (window.innerWidth <= 768) { + setIsNavbarCollapsed(true); + } else { + setIsNavbarCollapsed(false); + } + }; + + useEffect(() => { + window.addEventListener("scroll", changeColor); + window.addEventListener("resize", checkNavbarCollapse); + return () => { + window.removeEventListener("scroll", changeColor); + window.removeEventListener("resize", checkNavbarCollapse); + }; + }, []); // Replace javascript:void(0) path with your path const navigation = [ - { title: "Custom", path: "javascript:void(0)" }, - { title: "Services", path: "javascript:void(0)" }, - { title: "Work", path: "javascript:void(0)" }, - { title: "About Us", path: "javascript:void(0)" }, + { title: "Services", path: "#Services" }, + { title: "Contact", path: "javascript:void(0)" }, ]; return (