написал страницу авторизации
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
import { NavLink } from "react-router";
|
||||
import { useAppDispatch, useAppSelector } 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" >Выход</NavLink>
|
||||
<NavLink to="login" onClick={() => dispatch(logout())} >Выход</NavLink>
|
||||
</div>
|
||||
</nav>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user