import React, { useState } from "react"; import { Link, useNavigate } from "react-router-dom"; import { useAuth } from "../auth"; import { UserIcon } from "../icons"; export const Header = () => { const { user, logout } = useAuth(); const navigate = useNavigate(); const [isClicked, setIsClicked] = useState(false); const handleHeaderClick = () => { setIsClicked(!isClicked); }; return (
Simple Survey
{user.isLoggedIn ? (
) : (
)}
); };