import React, { useEffect, useState } from "react"; import { Link, useLocation, useNavigate } from "react-router-dom"; import { useAuth } from "../auth/auth.context"; import { UserIcon } from "../icons"; export const Header = () => { const { user, logout } = useAuth(); const location = useLocation(); const navigate = useNavigate(); const [windowSize, setWindowSize] = useState({ width: window.innerWidth, height: window.innerHeight, }); const handleResize = () => { setWindowSize({ width: window.innerWidth, height: window.innerHeight, }); }; useEffect(() => { window.addEventListener("resize", handleResize); return () => { window.removeEventListener("resize", handleResize); }; }, []); return (
); };