import { useState } from "react"; import { Replay } from "../../types/replay"; import { ActionButton } from "./ActionButton"; interface ReplayRowProps { replay: Replay; onView: (uuid: string) => void; onDelete: (uuid: string) => void; } const ReplayRow: React.FC = ({ replay, onView, onDelete }) => { const [isDialogOpen, setIsDialogOpen] = useState(false); const openDialog = () => setIsDialogOpen(true); const closeDialog = () => setIsDialogOpen(false); return ( <> {replay.name} {replay.uuid} {replay.created_by} {new Date(replay.time_created * 1000).toLocaleString()} onView(replay.uuid)}> View onDelete(replay.uuid)}> Delete openDialog()}> Details {isDialogOpen && (

Replay Details

Name: {replay.name}

UUID: {replay.uuid}

Created By: {replay.created_by}

Time Created: {new Date(replay.time_created * 1000).toLocaleString()}

Close
)} ); } export default ReplayRow;