// components/ui/Feed.tsx 'use client'; import * as React from 'react'; import { Fragment } from 'react'; import { ChatBubbleLeftEllipsisIcon, TagIcon, UserCircleIcon, } from '@heroicons/react/20/solid'; import clsx from 'clsx'; /* ───────── Types ───────── */ export type FeedPerson = { name: string; href?: string; }; export type FeedTag = { name: string; href?: string; /** z.B. 'fill-red-500' */ color?: string; }; export type FeedItem = | { id: string | number; type: 'comment'; person: FeedPerson; imageUrl?: string; comment: string; date: string; } | { id: string | number; type: 'assignment'; person: FeedPerson; assigned: FeedPerson; date: string; } | { id: string | number; type: 'tags'; person: FeedPerson; tags: FeedTag[]; date: string; }; export interface FeedProps { items: FeedItem[]; className?: string; } /* ───────── Helper ───────── */ function classNames(...classes: Array) { return classes.filter(Boolean).join(' '); } /* ───────── Component ───────── */ export default function Feed({ items, className }: FeedProps) { if (!items.length) { return (

Keine Aktivitäten vorhanden.

); } return (
); }