mirror of
https://github.com/tmdinosaurcenter/gas-form.git
synced 2025-04-04 03:11:22 -06:00
18 lines
477 B
TypeScript
18 lines
477 B
TypeScript
"use client"
|
|
|
|
import { Toast, ToastClose, ToastDescription, ToastTitle, ToastViewport } from "@/components/ui/toast"
|
|
import { useToast } from "@/components/ui/use-toast"
|
|
|
|
export function Toaster() {
|
|
const { message } = useToast()
|
|
|
|
return message ? (
|
|
<Toast>
|
|
<ToastTitle>Notification</ToastTitle>
|
|
<ToastDescription>{message}</ToastDescription>
|
|
<ToastClose onClick={() => console.log("Close Toast")} />
|
|
<ToastViewport />
|
|
</Toast>
|
|
) : null
|
|
}
|