"use client"; import { useState, useEffect } from "react"; import { CardSkeleton } from "@/shared/components"; import { CLI_TOOLS, MITM_TOOLS } from "@/shared/constants/cliTools"; import { MitmLinkCard } from "./components"; import ToolSummaryCard from "./components/ToolSummaryCard"; const ALL_STATUSES_URL = "/api/cli-tools/all-statuses"; export default function CLIToolsPageClient({ machineId }) { const [loading, setLoading] = useState(true); const [toolStatuses, setToolStatuses] = useState({}); useEffect(() => { let mounted = true; (async () => { try { const res = await fetch(ALL_STATUSES_URL); if (res.ok && mounted) setToolStatuses(await res.json()); } catch (error) { console.log("Error fetching tool statuses:", error); } finally { if (mounted) setLoading(false); } })(); return () => { mounted = false; }; }, []); if (loading) { return (