Feat/integration events page - #83
Merged
Merged
Conversation
Collaborator
Author
|
@copilot review and provide feedback |
6 tasks
There was a problem hiding this comment.
Pull request overview
Integrates the Events page with Supabase-backed API routes in the Next.js app, adding a service layer for event fetches, UI refactors to reduce coupling, and client-side pagination/animations for a smoother browsing experience.
Changes:
- Added Next.js API routes (
/api/events/*) plus a small Supabase networking utility and events service layer. - Refactored the Events page/components to fetch upcoming/past events from the new API and added client-side pagination + Framer Motion transitions.
- Introduced a reusable
ErrorStatecomponent for error presentation.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/package.json | Adds dependencies needed for Supabase, animations, and icons. |
| frontend/package-lock.json | Locks new dependency graph for the added packages. |
| frontend/components/ErrorState.tsx | New error UI component intended for Events page failure states. |
| frontend/app/events/utils.ts | Adds pagination + date formatting utilities for Events UI. |
| frontend/app/events/types.ts | Defines Event and API response types. |
| frontend/app/events/page.tsx | Refactors Events page to fetch upcoming/past events via Next API routes. |
| frontend/app/events/EventSection.tsx | Accepts events via props; adds pagination UI and framer-motion transitions. |
| frontend/app/events/EventCard.tsx | Adjusts card props and component definition (now expects an id). |
| frontend/app/api/utils/supabase.ts | Adds shared helpers for env credentials + Supabase Edge/REST fetch wrappers. |
| frontend/app/api/events/service.ts | Service layer for fetching events via Supabase Edge Functions. |
| frontend/app/api/events/route.ts | New combined endpoint returning upcoming + past events. |
| frontend/app/api/events/upcoming/route.ts | New endpoint proxying to edge function upcoming events. |
| frontend/app/api/events/past/route.ts | New endpoint proxying to edge function past events. |
| frontend/app/api/events/[id]/route.ts | New endpoint intended to fetch a single event by id. |
Files not reviewed (1)
- frontend/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Integrated API in events page...
NOTE: Another env file needed in the /frontend folder so nextjs can detect it. copy current env file into /frontend folder and it should work fine