diff --git a/GrossesMitaines/grosses-mitaines-ui/src/components/App.js b/GrossesMitaines/grosses-mitaines-ui/src/components/App.js index 8cf5038..7cf22a0 100644 --- a/GrossesMitaines/grosses-mitaines-ui/src/components/App.js +++ b/GrossesMitaines/grosses-mitaines-ui/src/components/App.js @@ -8,7 +8,7 @@ import Morceaux from "../pages/Morceaux"; import MorceauDetail from "../pages/MorceauDetail"; import Inventaire from "../pages/Inventaire"; import Login from "../pages/Login"; - +import Logout from "../pages/Logout"; const App = () => { return ( @@ -22,6 +22,7 @@ const App = () => { }/> }/> }/> + }/> diff --git a/GrossesMitaines/grosses-mitaines-ui/src/components/Topbar.js b/GrossesMitaines/grosses-mitaines-ui/src/components/Topbar.js index ea5a31d..7bd607b 100644 --- a/GrossesMitaines/grosses-mitaines-ui/src/components/Topbar.js +++ b/GrossesMitaines/grosses-mitaines-ui/src/components/Topbar.js @@ -34,6 +34,9 @@ const Topbar = () => { Connexion + + Déconnexion + Gestion diff --git a/GrossesMitaines/grosses-mitaines-ui/src/pages/Logout.js b/GrossesMitaines/grosses-mitaines-ui/src/pages/Logout.js new file mode 100644 index 0000000..ca507b5 --- /dev/null +++ b/GrossesMitaines/grosses-mitaines-ui/src/pages/Logout.js @@ -0,0 +1,15 @@ + +const Logout = () => { + const response = fetch(`https://localhost:7292/api/Logout`, { + method: 'POST', + }) + + return ( +
+

Vous n'êtes plus connecté!

+
Faites le party ou quelque-chose...
+
+ ) +} + +export default Logout; \ No newline at end of file