Files
Frontend/front/src/widgets/Header/Header.tsx
T
2025-10-25 16:39:44 +03:00

20 lines
570 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { NavLink } from "react-router";
import { useAppDispatch } from '../../app/hooks';
import { logout } from "../../features/auth/authSlice";
const Header = () =>{
const dispatch = useAppDispatch();
return(
<nav className="header">
<div className="account-menu">
<NavLink to="/" end >Главная</NavLink>
<NavLink to="history" >История</NavLink>
<NavLink to="login" onClick={() => dispatch(logout())} >Выход</NavLink>
</div>
</nav>
)
}
export default Header;