2022-03-09 16:00:36 +01:00
|
|
|
import { Store } from "react-notifications-component"
|
|
|
|
|
|
|
|
const notifications = {
|
|
|
|
error: (error: string, title: string) => {
|
|
|
|
Store.addNotification({
|
|
|
|
container: "top-right",
|
|
|
|
type: "danger",
|
|
|
|
message: error,
|
|
|
|
title: title,
|
|
|
|
dismiss: {
|
|
|
|
duration: 10000,
|
2022-03-10 11:12:21 +01:00
|
|
|
},
|
2022-03-09 16:00:36 +01:00
|
|
|
})
|
|
|
|
},
|
|
|
|
success: (message: string, title: string) => {
|
|
|
|
Store.addNotification({
|
|
|
|
container: "top-right",
|
|
|
|
type: "success",
|
|
|
|
message: message,
|
|
|
|
title: title,
|
|
|
|
dismiss: {
|
|
|
|
duration: 3000,
|
2022-03-10 11:12:21 +01:00
|
|
|
},
|
2022-03-09 16:00:36 +01:00
|
|
|
})
|
2022-03-10 11:12:21 +01:00
|
|
|
},
|
2022-03-09 16:00:36 +01:00
|
|
|
}
|
|
|
|
|
2022-03-10 11:12:21 +01:00
|
|
|
export default notifications
|