We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40b39fa commit c42cb9fCopy full SHA for c42cb9f
1 file changed
frontend/src/hooks/useCustomToast.ts
@@ -1,21 +1,15 @@
1
-"use client"
2
-
3
-import { toaster } from "@/components/ui/toaster"
+import { toast } from "sonner"
4
5
const useCustomToast = () => {
6
const showSuccessToast = (description: string) => {
7
- toaster.create({
8
- title: "Success!",
+ toast.success("Success!", {
9
description,
10
- type: "success",
11
})
12
}
13
14
const showErrorToast = (description: string) => {
15
16
- title: "Something went wrong!",
+ toast.error("Something went wrong!", {
17
18
- type: "error",
19
20
21
0 commit comments