Default
Function: default()
[object Object]
Defined in: app/components/Activity/UpcomingActivities.tsx:33
A responsive container component that displays a dynamic number of upcoming activities.
Features:
- Dynamic Grid Layout: Uses a
ResizeObserverto calculate how many activity tiles can fit side-by-side based on a minimum tile width (250px). - Smart Stacking: Automatically switches to a vertical stack of 3 items when the container is too narrow for a multi-column grid (e.g., on mobile devices).
- Automatic Slice: Ensures that only the number of activities that physically fit the screen are rendered, preventing layout overflow.
- Empty State: Renders a
NoContentTilewith a localized message if the activity list is empty.
Parameters
props
The component props.
activities
The array of upcoming activity objects to display.
Returns
[object Object]
Component
Example
<UpcomingActivities
activities={upcomingActivitiesData}
/>