mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-10-04 03:40:10 +00:00
28 lines
556 B
TypeScript
28 lines
556 B
TypeScript
import { toast } from "react-toastify";
|
|
import { intl } from "src/locale";
|
|
import { Msg } from "./Msg";
|
|
import styles from "./Msg.module.css";
|
|
|
|
const showSuccess = (message: string) => {
|
|
toast(Msg, {
|
|
className: styles.toaster,
|
|
data: {
|
|
type: "success",
|
|
title: intl.formatMessage({ id: "notification.success" }),
|
|
message,
|
|
},
|
|
});
|
|
};
|
|
|
|
const showError = (message: string) => {
|
|
toast(<Msg />, {
|
|
data: {
|
|
type: "error",
|
|
title: intl.formatMessage({ id: "notification.error" }),
|
|
message,
|
|
},
|
|
});
|
|
};
|
|
|
|
export { showSuccess, showError };
|