'use client'; import { createContext, useContext } from "react"; import { toast } from "react-toastify"; const ToastContext = createContext(); export function ToastProvider({ children }) { return ( {children} ); } export function useToast() { const context = useContext(ToastContext); if (!context) { throw new Error("useToast must be used within a ToastProvider"); } return context; }