From 3d19c1b1cfabcc35467f6220b529334fffa837a2 Mon Sep 17 00:00:00 2001 From: Tripti Singh Date: Mon, 11 Aug 2025 21:11:47 +0530 Subject: [PATCH] Fixed: Mobile Navbar --- src/components/Navbar.jsx | 154 ++++++++++++++++++++++---------------- 1 file changed, 89 insertions(+), 65 deletions(-) diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 420d943..ece71a6 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -4,7 +4,7 @@ import { FiSearch, FiX } from 'react-icons/fi'; import { useAuth } from '../context/AuthContext'; export const Navbar = () => { - const { user } = useAuth(); // Get user from context + const { user } = useAuth(); const navigate = useNavigate(); const [showSearch, setShowSearch] = useState(false); @@ -14,7 +14,7 @@ export const Navbar = () => { const handleProfileClick = () => navigate('/profile'); const toggleSearch = () => { - setShowSearch(!showSearch); + setShowSearch((prev) => !prev); setInputValue(""); }; @@ -26,78 +26,102 @@ export const Navbar = () => { } }; - - return ( - - {/* Auth */} - {user ? ( - - ) : ( - - )} + {/* Mobile Navigation Links */} +
+ + Home + + + About Us + + + Watch-list +
- - - + ); -}; \ No newline at end of file +};