import { useState } from "react"; import { useBridge } from "./hooks/useBridge"; import { Dashboard } from "./components/Dashboard"; import { ConnectionPanel } from "./components/ConnectionPanel"; import { ConfigPanel } from "./components/ConfigPanel"; import { LogsPanel } from "./components/LogsPanel"; import { statusLabel, isError } from "./types"; import "./App.css"; type Tab = "dashboard" | "connection" | "config" | "logs"; function App() { const [tab, setTab] = useState("dashboard"); const bridge = useBridge(); const status = bridge.status; const isRunning = status === "Running"; const isStarting = status === "Starting"; const statusColor = isRunning ? "var(--green)" : isStarting ? "var(--orange)" : status && isError(status) ? "var(--red)" : "var(--gray)"; return (

TutaBridge

{status ? statusLabel(status) : "Loading..."}
{tab === "dashboard" && ( )} {tab === "connection" && ( )} {tab === "config" && ( )} {tab === "logs" && ( )}
); } export default App;