mirror of
https://github.com/hubHarmony/servii-frontend.git
synced 2024-11-17 21:40:30 +00:00
Merge pull request #3 from Antoninop/react-toastify
[+] react-toastify integration
This commit is contained in:
commit
4e6dbd03c3
13
src/App.jsx
13
src/App.jsx
@ -37,7 +37,18 @@ const App = () => {
|
||||
<Route path="/" element={<Navigate to={user ? "/dashboard" : "/login"} />} />
|
||||
<Route path="*" element={<NotFoundPage />} />
|
||||
</Routes>
|
||||
<ToastContainer />
|
||||
<ToastContainer
|
||||
position="top-center"
|
||||
autoClose={2500}
|
||||
hideProgressBar={false}
|
||||
newestOnTop={false}
|
||||
closeOnClick
|
||||
rtl={false}
|
||||
pauseOnFocusLoss
|
||||
draggable
|
||||
pauseOnHover
|
||||
theme="colored"
|
||||
/>
|
||||
</div>
|
||||
</Router>
|
||||
);
|
||||
|
@ -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 };
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user