// frontend/components/connectors/ConnectorCard.tsx — 라이프 연결 카드 (글래스, on/last/상태) "use client"; import { type CSSProperties } from "react"; import { Icon } from "@/components/Icon"; import type { IconName } from "@/components/icons/paths"; import type { ConnectorStatus } from "@/lib/types"; import { ConnectStateBadge } from "./ConnectStateBadge"; import { ImportDropzone } from "./ImportDropzone"; // 도메인 → 대표 아이콘 (Icon 글리프 재사용) const DOMAIN_ICON: Record = { mail: "mail", calendar: "cal", chat: "msg", finance: "wallet", health: "heart", knowledge: "brain", }; export function ConnectorCard({ connector, onSync, onDisconnect, onImport, }: { connector: ConnectorStatus; onSync: (id: string) => void; onDisconnect: (id: string) => void; onImport: (file: File) => void; }) { const c = connector; const syncing = c.state === "syncing"; return (
{c.name} {c.kind}
{c.on ? ( <> ) : ( )}
); }