request list + structure

This commit is contained in:
hamid zarghami
2025-10-20 12:28:48 +03:30
commit dbe37e371e
89 changed files with 9547 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
interface Toast {
id: string;
message: string;
type?: "success" | "error" | "info";
isExiting?: boolean;
}
let addToast: (toast: Toast) => void;
export const toast = (
message?: string,
type: "success" | "error" | "info" = "info"
) => {
if (addToast) {
addToast({ id: Date.now().toString(), message: message || "", type });
}
};
export const setAddToast = (fn: (toast: Toast) => void) => {
addToast = fn;
};