From 501f35a70ba0998492c8843031a1b2c45c0348b4 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Mon, 14 Apr 2025 15:59:34 -0700 Subject: [PATCH] add toast to scaffold --- scaffold/src/utils/toast.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scaffold/src/utils/toast.ts diff --git a/scaffold/src/utils/toast.ts b/scaffold/src/utils/toast.ts new file mode 100644 index 0000000..b0dd80d --- /dev/null +++ b/scaffold/src/utils/toast.ts @@ -0,0 +1,17 @@ +import { toast } from "sonner"; + +export const showSuccess = (message: string) => { + toast.success(message); +}; + +export const showError = (message: string) => { + toast.error(message); +}; + +export const showLoading = (message: string) => { + return toast.loading(message); +}; + +export const dismissToast = (toastId: string) => { + toast.dismiss(toastId); +};