import type { Player } from "@/server/db/schema"; import React from "react"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { ShieldQuestion, UserX } from "lucide-react"; import { api } from "@/trpc/react"; import { Button } from "@/components/ui/button"; function KickPlayerDialog({ player, lobbyId, }: { player: Pick; lobbyId: string; }) { const kickPlayer = api.lobby.kick.useMutation(); const handleAction = () => { kickPlayer.mutate({ lobbyId: lobbyId, playerId: player.id }); }; return ( Kick Player Are you absolutely sure to kick {player.displayName} This action cannot be undone. This will remove {player.displayName} from the lobby. Cancel ); } export default KickPlayerDialog;