website refactor
This commit is contained in:
33
apps/website/components/feed/FeedList.tsx
Normal file
33
apps/website/components/feed/FeedList.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import React from 'react';
|
||||
import { FeedEmptyState } from '@/ui/FeedEmptyState';
|
||||
import { FeedItemCard } from '@/components/feed/FeedItemCard';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
|
||||
interface FeedItemData {
|
||||
id: string;
|
||||
type: string;
|
||||
headline: string;
|
||||
body?: string;
|
||||
timestamp: string;
|
||||
formattedTime: string;
|
||||
ctaHref?: string;
|
||||
ctaLabel?: string;
|
||||
}
|
||||
|
||||
interface FeedListProps {
|
||||
items: FeedItemData[];
|
||||
}
|
||||
|
||||
export function FeedList({ items }: FeedListProps) {
|
||||
if (!items.length) {
|
||||
return <FeedEmptyState />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Stack gap={4}>
|
||||
{items.map(item => (
|
||||
<FeedItemCard key={item.id} item={item} />
|
||||
))}
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user