From a58091b76a9bf33b3200ef65af6aeabdfc53a666 Mon Sep 17 00:00:00 2001 From: Charles Le Maux Date: Wed, 10 Jul 2024 15:20:42 +0100 Subject: [PATCH] [+] react-toastify integration --- src/App.jsx | 13 ++++++++++++- src/service/api.tsx | 12 ++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/App.jsx b/src/App.jsx index 3ca37a1..6aa4a59 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -37,7 +37,18 @@ const App = () => { } /> } /> - + ); diff --git a/src/service/api.tsx b/src/service/api.tsx index 08506ac..706d213 100644 --- a/src/service/api.tsx +++ b/src/service/api.tsx @@ -1,4 +1,5 @@ import { getAuth } from 'firebase/auth'; +import {Bounce, toast} from "react-toastify"; const apiUrl: string = 'https://www.servii.fr/api'; @@ -68,6 +69,17 @@ class serviiApi { } return { return_code: status, message: json }; } + toast.info(json.message, { + position: "top-center", + autoClose: 2500, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "colored", + transition: Bounce, + }); return { return_code: status, message: json.message }; }