// frontend/components/inbox/TodayRouted.tsx "use client"; import Link from "next/link"; import { Icon } from "@/components/Icon"; import { TYPE_LABEL } from "@/lib/inbox/presentation"; import type { RouteType, UiInboxItem } from "@/lib/types"; const DEST_META: Record = { task: { tone: "green", href: "/tasks" }, event: { tone: "blue", href: "/dashboard" }, idea: { tone: "violet", href: null }, }; const ORDER: RouteType[] = ["task", "event", "idea"]; export default function TodayRouted({ items, todayRouted, }: { items: UiInboxItem[]; todayRouted: number; }) { const routed = items.filter( (x) => x.classification && (x.status === "confirmed" || x.status === "classified"), ); const byType = (t: RouteType) => routed.filter((x) => x.classification!.type === t); const subFor = (t: RouteType) => { const g = byType(t); const life = g.filter((x) => x.classification!.sphere === "life").length; const work = g.filter((x) => x.classification!.sphere === "work").length; if (t === "event") return "캘린더 등록"; if (t === "idea") return "보드 보관"; return `개인 ${life} · 업무 ${work}`; }; return (

오늘 어디로 갔나

{todayRouted}건의 행선지
{ORDER.map((t) => { const meta = DEST_META[t]; const n = byType(t).length; const inner = ( <> {TYPE_LABEL[t]} {subFor(t)} {n} {meta.href && ( )} ); return meta.href ? ( {inner} ) : (
{inner}
); })}
분류가 마음에 안 들면 칩을 눌러 바꾸세요 — 아리가 다음부터 기억해요.
); }