From fa968a878d68d09bf5650804c1a61228af0a8f84 Mon Sep 17 00:00:00 2001 From: felixoder Date: Tue, 22 Oct 2024 23:34:59 +0530 Subject: [PATCH] Fixed the allignment of the footer for smaller screens --- frontend/src/components/Navbar.jsx | 67 ++++++----------- frontend/src/components/style/Navbar.css | 96 ++++++++++++------------ 2 files changed, 75 insertions(+), 88 deletions(-) diff --git a/frontend/src/components/Navbar.jsx b/frontend/src/components/Navbar.jsx index 13ce13f..d22c14e 100644 --- a/frontend/src/components/Navbar.jsx +++ b/frontend/src/components/Navbar.jsx @@ -1,53 +1,36 @@ import React, { useState } from "react"; -import Sheet from "react-modal-sheet"; -import './style/Navbar.css'; +import "./style/Navbar.css"; + export default function Navbar() { const [spanStyle, setSpanStyle] = useState({ left: "0px", width: "95px" }); const widthMapping = [95, 94, 110, 115, 110]; + const handleHover = (index) => { - const leftPosition = index === 0 ? 0 : widthMapping.slice(0, index).reduce((a, b) => a + b, 0); - setSpanStyle({ left: `${leftPosition}px`, width: `${widthMapping[index]}px` }); + const leftPosition = + index === 0 ? 0 : widthMapping.slice(0, index).reduce((a, b) => a + b, 0); + setSpanStyle({ + left: `${leftPosition}px`, + width: `${widthMapping[index]}px`, + }); }; + return ( -
-