import React from "react"; import Logo from "../Logo/Logo.tsx"; import Account from "../Account/Account.tsx"; import styles from './Header.module.css'; import {Link, useLocation, useNavigate} from "react-router-dom"; const Header: React.FC = () => { const location = useLocation(); const navigate = useNavigate(); const isCreateSurveyActive = location.pathname.startsWith('/survey/create'); const isMySurveysActive = location.pathname === '/my-surveys'; const isCompleteSurveyActive = location.pathname === '/complete-survey'; const isSurveyViewPage = location.pathname.startsWith('/survey/') && !location.pathname.startsWith('/survey/create'); const handleLogoClick = () => { navigate(location.pathname, { replace: true }); }; return (
); }; export default Header;