change spin animation on data grid loader

This commit is contained in:
Raja Oktafrianto
2025-04-23 16:29:26 +07:00
parent 257fb29740
commit 0ea561aebc
3 changed files with 19 additions and 33 deletions

View File

@ -178,7 +178,7 @@ const ManageMembers = () => {
toast.success('Success Create Member. PIN sent to email');
}
} catch (error: any) {
if (error?.response?.data?.message) toast.error(error?.response?.data?.message)
if (error?.response?.data?.message) toast.error(error?.response?.data?.message);
else toast.error(error.message);
} finally {
setDialogOpen(false);
@ -239,10 +239,12 @@ const ManageMembers = () => {
<div className="grid gap-5 lg:gap-7.5 mt-5 relative">
{isReloading && (
<div className="absolute inset-0 bg-white/70 z-10 flex items-center justify-center">
<div className="flex flex-col items-center">
<RefreshCw className="animate-spin h-8 w-8 text-slate-500 mb-2" />
<span className="text-slate-500 font-medium">Refreshing data...</span>
<div className="fixed inset-0 bg-transparent flex items-center justify-center z-50 text-muted-foreground px-4 py-2">
<div className="bg-card flex items-center border shadow-sm rounded-md">
<div className="flex flex-col items-center">
<RefreshCw className="animate-spin h-8 w-8 text-slate-500 mb-2" />
<span className="text-slate-500 font-medium">Refreshing data...</span>
</div>
</div>
</div>
)}