web-production-saas-starter/next_b2b_starter/hooks/use-toast.ts
2025-12-16 18:54:41 +04:00

26 lines
No EOL
697 B
TypeScript

// hooks/use-toast.ts
// Simple toast implementation for now
interface ToastProps {
title?: string;
description?: string;
variant?: "default" | "destructive";
}
export function useToast() {
const toast = ({ title, description, variant }: ToastProps) => {
// For now, just use console and alert
// This can be replaced with a proper toast library later
const message = `${title}${description ? `: ${description}` : ''}`;
if (variant === "destructive") {
console.error(message);
// In production, this would show a red toast
} else {
console.log(message);
// In production, this would show a success/info toast
}
};
return { toast };
}