// frontend/components/tasks/bits.tsx — 공용 작은 조각 (아바타/프로젝트 태그)
"use client";
import type { Person, Project } from "@/lib/types";

export function Av({ person }: { person?: Person | null }) {
  if (!person) return null;
  return (
    <div className="av" style={{ background: person.color }} title={person.name}>
      {person.initial}
    </div>
  );
}

export function Tag({ project }: { project?: { name: string; tone: string } | Project | null }) {
  if (!project) return null;
  return (
    <span className="ktag">
      <span className="pdot" style={{ background: `var(--${project.tone})` }} />
      <span>{project.name}</span>
    </span>
  );
}
