QR fontSize; routing

This commit is contained in:
Peter Hoppe
2023-01-05 16:24:59 +01:00
parent 37e8710f70
commit 44b4605324
6 changed files with 62 additions and 10 deletions

View File

@ -1,10 +1,13 @@
import React, { useContext } from 'react'
import './Header.css';
import {Axios, UserCtx, UserCtxT} from '../context/UserContext';
import { useNavigate } from 'react-router-dom';
function Header() {
const {setUser} = useContext<UserCtxT | null>(UserCtx) as UserCtxT;
const navigate = useNavigate();
const logOut = () =>
{
Axios.post('logout.php')
@ -15,6 +18,8 @@ function Header() {
.catch((err) => console.error(err));
setUser(null);
navigate('/'); // login
}
return (