refactor(events): move grid components from event-list to event-grid directory
All checks were successful
Client CMS Check Build (NixCN CMS) TeamCity build finished
Backend Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2026-02-07 17:31:49 +08:00
parent afbecff995
commit 0e51c1ee39
10 changed files with 10 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
import type { EventInfo } from '../types';
import { EventCardView } from '../event-card.view';
import { EventGridEmpty } from './event-grid.empty';
export function EventGridView({ events, footer }: { events: EventInfo[]; footer: (event: EventInfo) => React.ReactNode }) {
return (
<>
{events.length > 0 && (
<div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4">
{events.map(event => (
<EventCardView key={event.eventId} eventInfo={event} actionFooter={footer(event)} />
))}
</div>
)}
{events.length === 0 && <EventGridEmpty />}
</>
);
}