groupomania/client/src/controllers/Toasts.ts

27 lines
573 B
TypeScript

import { toast } from "react-toastify";
const toastSuccess = (message: string) => {
toast.success(message, {
position: 'top-right',
autoClose: 5000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: true,
draggable: true,
progress: undefined,
});
}
const toastError = (message: string) => {
toast.error(message, {
position: 'top-right',
autoClose: 5000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: true,
draggable: true,
progress: undefined,
});
}
export { toastSuccess, toastError };