34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import type { Provider } from "@/types";
|
|
|
|
/**
|
|
* Activity tab content for the ProviderDrawer (SP21 Task 3.1).
|
|
*
|
|
* STUB — renders the top-10 `recent_activity` events as a flat list
|
|
* (`ts` + `kind`). Real activity-event routing (linking each event to
|
|
* its source claim/remit/provider) arrives in Phase 4 once
|
|
* `provider_added` and `remit_received` events get their drawer
|
|
* surfaces; for now the events aren't drillable from this view —
|
|
* clicking them does nothing. The ProviderDrawer's Overview already
|
|
* surfaces the provider's `provider_added` event via the Dashboard
|
|
* activity feed (Task 2.5).
|
|
*/
|
|
export function ProviderRecentActivity({ provider }: { provider: Provider }) {
|
|
const items = provider.recent_activity ?? [];
|
|
if (items.length === 0) {
|
|
return (
|
|
<div className="text-muted-foreground text-[13px]">No recent activity.</div>
|
|
);
|
|
}
|
|
return (
|
|
<ul className="space-y-1.5 text-[12.5px]">
|
|
{items.map((a) => (
|
|
<li key={a.id} className="flex items-center gap-2">
|
|
<span className="mono text-[10.5px] text-muted-foreground">
|
|
{new Date(a.ts).toLocaleString()}
|
|
</span>
|
|
<span>{a.kind}</span>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
);
|
|
} |