diff --git a/components/tablelist/TableList.tsx b/components/tablelist/TableList.tsx index 3d6e046..1c3846b 100644 --- a/components/tablelist/TableList.tsx +++ b/components/tablelist/TableList.tsx @@ -275,7 +275,7 @@ export const TableList: React.FC = ({ } setTimeout(() => { toast.dismiss(); - }, 2000); + }, 100); }; if (typeof onInit === "function") { onInit(local); @@ -943,7 +943,7 @@ export const Pagination: React.FC = ({ {/* Next */} - + ); diff --git a/components/ui/PinterestLayout.tsx b/components/ui/PinterestLayout.tsx index 1fa8b0b..7c66c65 100644 --- a/components/ui/PinterestLayout.tsx +++ b/components/ui/PinterestLayout.tsx @@ -23,10 +23,11 @@ export const PinterestLayout: React.FC<{ col: [] as string[], data: [] as string[], }, + user: null as any, + ready: false as boolean, }); useEffect(() => { - const columns: any[] = Array.from({ length: col }, () => []); // Inisialisasi array kosong sebanyak 'col' - + const columns: any[] = Array.from({ length: col }, () => []); data.forEach((item, index) => { const targetColumn = index % col; // Menentukan kolom target berdasarkan indeks columns[targetColumn].push(item); // Memasukkan elemen ke kolom yang sesuai @@ -34,7 +35,6 @@ export const PinterestLayout: React.FC<{ local.data = columns; local.render(); }, [data, col]); - return ( <>
diff --git a/components/ui/alert-dialog.tsx b/components/ui/alert-dialog.tsx index f41ad0a..dcb591f 100644 --- a/components/ui/alert-dialog.tsx +++ b/components/ui/alert-dialog.tsx @@ -18,7 +18,7 @@ const AlertDialogOverlay = React.forwardRef< >(({ className, ...props }, ref) => ( Promise | any; children?: any; @@ -21,7 +22,9 @@ export const Alert: FC<{ mode?: "auto" | "manual"; open?: boolean; onOpenChange?: (event: boolean) => void; + hiddenFooter?: boolean; }> = ({ + title = " Are you certain you want to continue?", type, onClick, children, @@ -31,6 +34,7 @@ export const Alert: FC<{ mode, open, onOpenChange, + hiddenFooter = false, }) => { const message: any = { save: "Your data will be saved securely. You can update it at any time if needed.", @@ -59,22 +63,26 @@ export const Alert: FC<{ ) : ( <> - - Are you certain you want to continue? - + {title} {msg || message?.[type]} - - No - - Yes - - + {!hiddenFooter ? ( + <> + + No + + Yes + + + + ) : ( + <> + )} )} diff --git a/utils/action.tsx b/utils/action.tsx index 72e73e5..aa6ade0 100644 --- a/utils/action.tsx +++ b/utils/action.tsx @@ -39,6 +39,7 @@ export const actionToast = async (data: { ); if (typeof task === "function") await task(); setTimeout(() => { + toast.dismiss(); toast.success(
-
- - {msg_error ? msg_error : " Failed"}{" "} - {get(ex, "response.data.meta.message") || ex.message}. -
-
, - { - dismissible: true, - className: css` - background: #ffecec; - border: 2px solid red; - `, - } - ); + setTimeout(() => { + toast.dismiss(); + toast.error( +
+
+ + {msg_error ? msg_error : " Failed"}{" "} + {get(ex, "response.data.meta.message") || ex.message}. +
+
, + { + dismissible: true, + className: css` + background: #ffecec; + border: 2px solid red; + `, + } + ); + }, 100); } };