diff --git a/app/(authenticated)/(admin)/admin/(admin components)/unlockUser/columns.tsx b/app/(authenticated)/(admin)/admin/(admin components)/unlockUser/columns.tsx index 4a847b5..4393ca7 100644 --- a/app/(authenticated)/(admin)/admin/(admin components)/unlockUser/columns.tsx +++ b/app/(authenticated)/(admin)/admin/(admin components)/unlockUser/columns.tsx @@ -4,17 +4,30 @@ import { aime_user_game_locks } from "@/prisma/schemas/artemis/generated/artemis import { Button } from "@/components/ui/button"; import { Trash2, UnlockIcon } from "lucide-react"; import { deleteUserGameLocks } from "./action"; +import { toast } from "@/components/ui/use-toast"; type chunithm = aime_user_game_locks & { userName: string | null }; const handleDelete = async (userId: number) => { try { const result = await deleteUserGameLocks(userId); if (result.success) { - console.log( - `Successfully deleted ${result.count} rows for user ${userId}.`, - ); + toast({ + title: "User Unlocked", + description: ( +
+            
Successfully unlocked the user
+
+ ), + }); } else { - console.error(result.message); + toast({ + title: "Failed to unlock user", + description: ( +
+            
User has already been unlocked
+
+ ), + }); } } catch (error) { console.error("Error deleting user game locks:", error);