mirror of
https://github.com/SamyRai/tercul-frontend.git
synced 2025-12-27 04:51:34 +00:00
Sets up the project with initial files, components, routes, and UI elements. Replit-Commit-Author: Agent Replit-Commit-Session-Id: cbacfb18-842a-4116-a907-18c0105ad8ec Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/39b5c689-6e8a-4d5a-9792-69cc81a56534/affc56b0-365e-4ece-9cba-9e70bbbf0893.jpg
34 lines
772 B
TypeScript
34 lines
772 B
TypeScript
import { useToast } from "@/hooks/use-toast"
|
|
import {
|
|
Toast,
|
|
ToastClose,
|
|
ToastDescription,
|
|
ToastProvider,
|
|
ToastTitle,
|
|
ToastViewport,
|
|
} from "@/components/ui/toast"
|
|
|
|
export function Toaster() {
|
|
const { toasts } = useToast()
|
|
|
|
return (
|
|
<ToastProvider>
|
|
{toasts.map(function ({ id, title, description, action, ...props }) {
|
|
return (
|
|
<Toast key={id} {...props}>
|
|
<div className="grid gap-1">
|
|
{title && <ToastTitle>{title}</ToastTitle>}
|
|
{description && (
|
|
<ToastDescription>{description}</ToastDescription>
|
|
)}
|
|
</div>
|
|
{action}
|
|
<ToastClose />
|
|
</Toast>
|
|
)
|
|
})}
|
|
<ToastViewport />
|
|
</ToastProvider>
|
|
)
|
|
}
|