@@ -6,6 +6,7 @@ import { toast } from "sonner";
66
77import { useDashboardQueryControls } from "@/components/dashboard/dashboard-query-provider" ;
88import { DataTableSwitch } from "@/components/dashboard/data-table-switch" ;
9+ import { TableActionButton } from "@/components/dashboard/table-action-button" ;
910import {
1011 AlertDialog ,
1112 AlertDialogAction ,
@@ -25,7 +26,6 @@ import {
2526 CardHeader ,
2627 CardTitle ,
2728} from "@/components/ui/card" ;
28- import { Clickable } from "@/components/ui/clickable" ;
2929import { Input } from "@/components/ui/input" ;
3030import { Label } from "@/components/ui/label" ;
3131import {
@@ -351,36 +351,26 @@ export function AdminUsersManagementClient({
351351 { shortDateTime ( locale , user . createdAt , timeZone ) }
352352 </ TableCell >
353353 < TableCell className = "text-right" >
354- < Clickable
354+ < TableActionButton
355355 onClick = { ( ) => {
356356 setPendingDeleteUserId ( user . id ) ;
357357 setDeleteUserDialogOpen ( true ) ;
358358 } }
359359 disabled = {
360360 deletingUserId !== null || user . id === currentUserId
361361 }
362- className = "size-6 text-destructive/80 hover:text-destructive"
363- aria-label = { t . delete }
364- title = { t . delete }
362+ label = { t . delete }
363+ tone = "destructive"
364+ transitionKey = {
365+ deletingUserId === user . id ? "deleting" : "delete"
366+ }
365367 >
366- < AutoTransition className = "inline-flex items-center justify-center" >
367- { deletingUserId === user . id ? (
368- < span
369- key = "deleting"
370- className = "inline-flex items-center justify-center"
371- >
372- < Spinner className = "size-3.5" />
373- </ span >
374- ) : (
375- < span
376- key = "delete"
377- className = "inline-flex items-center justify-center"
378- >
379- < RiDeleteBinLine className = "size-4" />
380- </ span >
381- ) }
382- </ AutoTransition >
383- </ Clickable >
368+ { deletingUserId === user . id ? (
369+ < Spinner className = "size-3.5" />
370+ ) : (
371+ < RiDeleteBinLine className = "size-4" />
372+ ) }
373+ </ TableActionButton >
384374 </ TableCell >
385375 </ TableRow >
386376 ) ) }
0 commit comments