Skip to content

Conversation

@chadbrokaw
Copy link
Collaborator

This pull request improves the sorting and display of events in the EventCardSection component and updates the event data structure to include a featured property. The most significant change is that featured events are now prioritized and shown first in the UI.

Event sorting and display improvements:

  • The EventCardSection component now sorts events so that those marked as featured appear before others, using useMemo for efficiency. The displayed events and the "show more" logic are updated to use this sorted list. [1] [2]

Data model and API changes:

  • The EventResponse interface is updated to include a featured boolean property, ensuring the frontend can recognize and use the featured status of events.
  • The API query in useHomePageFeaturedResourcesData is updated to fetch all events (not just featured ones), allowing the frontend to handle featured sorting client-side.

@chadbrokaw chadbrokaw changed the title Development fix: repurpose featured flag to ensure resources render above fold Oct 23, 2025
@chadbrokaw chadbrokaw requested a review from Copilot October 23, 2025 16:14
Copy link

Copilot AI left a 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 EventResponse interface to include the featured boolean 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.

@chadbrokaw chadbrokaw merged commit 2371c46 into main Oct 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants