diff --git a/src/components/MyEntityStrip.tsx b/src/components/MyEntityStrip.tsx index edcf53b..c02164c 100644 --- a/src/components/MyEntityStrip.tsx +++ b/src/components/MyEntityStrip.tsx @@ -1,6 +1,6 @@ -import { useState, useRef, useEffect, type ReactNode } from 'react' +import { type ReactNode } from 'react' import { Link } from 'react-router-dom' -import { ChevronRight, ChevronDown, ChevronUp, Clock } from 'lucide-react' +import { ChevronRight, Clock } from 'lucide-react' import { formatRelativeTime } from '@/lib/utils' import { MyPanel, type MyPanelTheme } from './MyPanel' @@ -42,25 +42,9 @@ const STATUS_COLORS: Record = { archived: 'var(--ag-text-ghost)', } -// One collapsed row = 68px card + 10px gap buffer -const ROW_H = 78 - export function MyEntityStrip({ title, icon, items, emptyText, theme = 'agos', badge, headerAction, }: MyEntityStripProps) { - const [expanded, setExpanded] = useState(false) - const gridRef = useRef(null) - const [fullH, setFullH] = useState(null) - - useEffect(() => { - const el = gridRef.current - if (!el) return - const ro = new ResizeObserver(() => setFullH(el.scrollHeight)) - ro.observe(el) - setFullH(el.scrollHeight) - return () => ro.disconnect() - }, [items.length]) - if (items.length === 0 && !emptyText) return null return ( @@ -83,15 +67,7 @@ export function MyEntityStrip({
{emptyText ?? 'Nothing here yet'}
) : ( <> -
+
{items.map((item, idx) => { const dotColor = item.statusColor ?? (item.status ? STATUS_COLORS[item.status] ?? undefined : undefined) @@ -158,13 +134,6 @@ export function MyEntityStrip({ ) })}
- {fullH !== null && fullH > ROW_H && ( - - )} )}