add duration

This commit is contained in:
Romulus21
2024-02-17 00:02:39 +01:00
parent 335fc8b12b
commit f27ffc1ce8
19 changed files with 248 additions and 48 deletions

View File

@@ -1,7 +1,7 @@
import React from "react"
import {Link, useLocation} from "react-router-dom"
import {Link, NavLink, useLocation} from "react-router-dom"
import useAuthUser from "../hooks/AuthUser";
import Tracker from "./Tracker";
import Tracker from "./TimeTrackers/Tracker";
const Header = () => {
@@ -10,20 +10,26 @@ const Header = () => {
console.log(authUser)
return <header className="flex justify-between py-3 px-5 bg-blue-700 text-white text-xl">
<div>
<Link to="/">Ticcat</Link>
</div>
return <header className="bg-blue-700 text-white text-xl">
<div className="flex py-3 px-5 justify-between">
<div>
<Link to="/">Ticcat</Link>
</div>
{authUser && <Tracker />}
{authUser
? <span className="flex gap-2">
{authUser && <Tracker />}
{authUser
? <span className="flex gap-2">
<Link to="/profile" className={location.pathname === '/profile' ? 'font-bold' : ''}>{authUser.name}</Link>
</span>
: <span className="flex gap-2">
: <span className="flex gap-2">
<Link to="/connexion">Connexion</Link>
{/*<Link to="/sinscrire">S'inscrire</Link>*/}
{/*<Link to="/sinscrire">S'inscrire</Link>*/}
</span>}
</div>
<nav className="bg-gray-600 px-5 flex gap-5">
<NavLink to="/">ToDos</NavLink>
<NavLink to="/times">Times</NavLink>
</nav>
</header>
}