-
Notifications
You must be signed in to change notification settings - Fork 0
fix: repurpose featured flag to ensure resources render above fold #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add typing for react-gtm-module fix: temporarily deploy Google Analytics to staging fix: add temporary logging fix: remove GA4 logging
* fix: change language * test: fix test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modifies the event display logic to prioritize featured events, ensuring they appear at the top of the list rather than being the only events fetched. The key change is moving from server-side filtering to client-side sorting of featured events.
Key Changes:
- Updated API query to fetch all events instead of filtering for featured events only
- Added client-side sorting to display featured events first in the list
- Updated the
EventResponseinterface to include thefeaturedboolean property
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/hooks/StrapiAPI.ts | Removed featured filter from API query and added featured boolean to EventResponse interface |
| app/components/ui/Cards/EventCardSection.tsx | Implemented client-side sorting to prioritize featured events using useMemo |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This pull request improves the sorting and display of events in the
EventCardSectioncomponent and updates the event data structure to include afeaturedproperty. The most significant change is that featured events are now prioritized and shown first in the UI.Event sorting and display improvements:
EventCardSectioncomponent now sorts events so that those marked asfeaturedappear before others, usinguseMemofor efficiency. The displayed events and the "show more" logic are updated to use this sorted list. [1] [2]Data model and API changes:
EventResponseinterface is updated to include afeaturedboolean property, ensuring the frontend can recognize and use the featured status of events.useHomePageFeaturedResourcesDatais updated to fetch all events (not just featured ones), allowing the frontend to handle featured sorting client-side.