Description
Homepage (app/page.tsx) has hardcoded <Event> components. Need to fetch and display featured events from Sanity dynamically.
Current Behavior
<Event
title="Recreational Therapy - London, ON"
description="Join us for..."
date="Nov 16, 2025"
/>
Expected Behavior
- Fetch events marked as "featured" from Sanity
- Dynamically render featured events section
- Show up to 3 featured events
Acceptance Criteria
Technical Details
Files to modify:
app/page.tsx - Replace hardcoded Event components
app/_components/Event.tsx - Verify it handles Sanity data structure
Implementation:
const featuredEvents = await client.fetch(featuredEventsQuery);
{featuredEvents.slice(0, 3).map(event => (
<Event
key={event._id}
title={event.title}
description={event.description}
date={formatDate(event.date)}
/>
))}
Reference:
- Query:
sanity/lib/queries.ts:50
Description
Homepage (
app/page.tsx) has hardcoded<Event>components. Need to fetch and display featured events from Sanity dynamically.Current Behavior
Expected Behavior
Acceptance Criteria
featuredEventsQuery<Event>componentsTechnical Details
Files to modify:
app/page.tsx- Replace hardcoded Event componentsapp/_components/Event.tsx- Verify it handles Sanity data structureImplementation:
Reference:
sanity/lib/queries.ts:50