2025-02-17 20:55:20 +01:00

26 lines
492 B
TypeScript

"use client"
import { toaster } from "@/components/ui/toaster"
const useCustomToast = () => {
const showSuccessToast = (description: string) => {
toaster.create({
title: "Success!",
description,
type: "success",
})
}
const showErrorToast = (description: string) => {
toaster.create({
title: "Something went wrong!",
description,
type: "error",
})
}
return { showSuccessToast, showErrorToast }
}
export default useCustomToast