first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:52:23 +03:00
commit 880f412e2c
2662 changed files with 866266 additions and 0 deletions

21
ui/hooks/use-toast.ts Normal file
View File

@@ -0,0 +1,21 @@
import { toast as sonnerToast } from "sonner";
export interface Toast {
title: string;
description?: string;
variant?: "default" | "destructive";
}
export function useToast() {
const toast = ({ title, description, variant }: Toast) => {
const message = description ? `${title}: ${description}` : title;
if (variant === "destructive") {
sonnerToast.error(message);
} else {
sonnerToast.success(message);
}
};
return { toast };
}