Kenny Logout - I'm Alright (theme from Caddyshack)

This commit is contained in:
MarcEricMartel 2022-10-30 15:27:36 -07:00
parent cf3cb2a895
commit 63a02da413
3 changed files with 20 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import Morceaux from "../pages/Morceaux";
import MorceauDetail from "../pages/MorceauDetail"; import MorceauDetail from "../pages/MorceauDetail";
import Inventaire from "../pages/Inventaire"; import Inventaire from "../pages/Inventaire";
import Login from "../pages/Login"; import Login from "../pages/Login";
import Logout from "../pages/Logout";
const App = () => { const App = () => {
return ( return (
<BrowserRouter> <BrowserRouter>
@ -22,6 +22,7 @@ const App = () => {
<Route path="morceaux/:id" element={<MorceauDetail/>}/> <Route path="morceaux/:id" element={<MorceauDetail/>}/>
<Route path="inventaire" element={<Inventaire/>}/> <Route path="inventaire" element={<Inventaire/>}/>
<Route path="login" element={<Login/>}/> <Route path="login" element={<Login/>}/>
<Route path="logout" element={<Logout/>}/>
</Route> </Route>
</Routes> </Routes>
</BrowserRouter> </BrowserRouter>

View File

@ -34,6 +34,9 @@ const Topbar = () => {
<Link className="nav-link" to="/login" > <Link className="nav-link" to="/login" >
Connexion Connexion
</Link> </Link>
<Link className="nav-link" to="/logout" >
Déconnexion
</Link>
<Dropdown className="dropdown-gestion-container"> <Dropdown className="dropdown-gestion-container">
<Dropdown.Toggle className="dropdown-gestion" > <Dropdown.Toggle className="dropdown-gestion" >
Gestion Gestion

View File

@ -0,0 +1,15 @@
const Logout = () => {
const response = fetch(`https://localhost:7292/api/Logout`, {
method: 'POST',
})
return (
<div className="inventaire-form-container">
<h3 className="text-center">Vous n'êtes plus connecté!</h3>
<h5 className="text-center">Faites le party ou quelque-chose...</h5>
</div>
)
}
export default Logout;