A very performant and light (2mb in memory) link shortener and tracker. Written in Rust and React and uses Postgres/SQLite.
1"use client"
2
3import { useToast } from "@/hooks/use-toast"
4import {
5 Toast,
6 ToastClose,
7 ToastDescription,
8 ToastProvider,
9 ToastTitle,
10 ToastViewport,
11} from "@/components/ui/toast"
12
13export function Toaster() {
14 const { toasts } = useToast()
15
16 return (
17 <ToastProvider>
18 {toasts.map(function ({ id, title, description, action, ...props }) {
19 return (
20 <Toast key={id} {...props}>
21 <div className="grid gap-1">
22 {title && <ToastTitle>{title}</ToastTitle>}
23 {description && (
24 <ToastDescription>{description}</ToastDescription>
25 )}
26 </div>
27 {action}
28 <ToastClose />
29 </Toast>
30 )
31 })}
32 <ToastViewport />
33 </ToastProvider>
34 )
35}