import React, { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import Fez from './Fez'; import { ListIcon, UserIcon, MagnifyingGlassIcon } from '@phosphor-icons/react'; const Navbar = ({ toggleSidebar, isSidebarOpen, isSearchVisible, toggleSearch, }) => { const [isScrolled, setIsScrolled] = useState(false); useEffect(() => { const handleScroll = () => { setIsScrolled(window.scrollY > 0); }; window.addEventListener('scroll', handleScroll); return () => { window.removeEventListener('scroll', handleScroll); }; }, []); return (
{/* Sidebar Toggle (Desktop) */}
{/* Mobile Left Section */}
Fezcodex
{/* Desktop Left Section (Logo) */}
{!isSidebarOpen && ( Fez codex )}
{/* Center Text (Optional / Conditional) */} {isSidebarOpen && (
The Fez of Code
)} {/* Right Section (Actions) */}
About
); }; export default Navbar;