This commit is contained in:
2023-01-30 00:02:26 +01:00
parent 752e6c491a
commit ff8e4bc831
11 changed files with 204 additions and 284 deletions

View File

@ -1,13 +1,11 @@
import React, { useContext } from 'react'
import './Header.css';
import '../App.css';
import {UserCtx, UserCtxT} from '../context/UserContext';
import { useNavigate } from 'react-router-dom';
import {Axios} from '../services/PhpApi'
function Header() {
const {setUser} = useContext<UserCtxT | null>(UserCtx) as UserCtxT;
const navigate = useNavigate();
const logOut = () =>
@ -19,8 +17,6 @@ function Header() {
})
.catch((err) => console.error(err));
setUser(null);
navigate('/'); // login
}