"use client"; import { ColumnDef } from "@tanstack/react-table"; 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) { toast({ title: "User Unlocked", description: (
), }); } else { toast({ title: "Failed to unlock user", description: (Successfully unlocked the user
), }); } } catch (error) { console.error("Error deleting user game locks:", error); } }; export const columns: ColumnDefUser has already been unlocked