import { useState } from "react"; import type { Robot } from "../types/robot"; type ExpandedRobotsState = Record; type Props = { robots: Robot[]; }; function RobotList({ robots }: Props) { const [expandedRobots, setExpandedRobots] = useState( {} ); function toggleRobotHistory(robotId: number) { setExpandedRobots((prev) => ({ ...prev, [robotId]: !prev[robotId], })); } return ( ); } export default RobotList;