Skip to content
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

Implement per-category page #86

Merged
merged 8 commits into from
Sep 25, 2024
Merged

Implement per-category page #86

merged 8 commits into from
Sep 25, 2024

Conversation

haoyangw
Copy link
Contributor

@haoyangw haoyangw commented Sep 25, 2024

Changes:

  • Added new Page for viewing per-category events
  • Updated sidebar to populate categories using data fetched from backend
  • Fix event filtering by Category IDs through the /events backend endpoint

This closes #68

-axios serializes arrays differently from how fastapi parses arrays in a URL param
-Implement a custom serializer on the frontend for the category_ids param used for the /events backend
-This fixes the home page top events component: now it displays user-specific categories instead of top events from any category
-Rename 'Science & Tech' to 'Science & Technology' in the frontend Category enum to match the backend naming
-This fixes the display of the 'Science & Tech' category on the home page
-New getEventsForCategory() query to request all events for a given list of category ids from backend
NewsArticle relies on react hooks like useEffect(), so it needs to be rendered on the client side
-Basic page that displays all events in the backend database for a given Category ID
-Sidebar is now dynamically populated with categories fetched from the backend
-Clicking a category on the sidebar brings up the Category-specific page powered by the new category-specific Page component
@haoyangw haoyangw merged commit 01b0cb5 into main Sep 25, 2024
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.

[Workflow 3]: Implement fetch category + display category events
1 participant