feat: integrate events detail page and events page together - #98
Open
kr1shap wants to merge 1 commit into
Open
Conversation
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.
Description
This pull request refactors the event listing and event detail pages to improve maintainability, enhance user experience, and support dynamic event data fetching. Key improvements include migrating event components to a new directory structure, introducing client-side data fetching for event details, and refactoring components for better type safety and reusability.
Event Detail Page Improvements:
EventDetailPage(frontend/app/events/[id]/page.tsx) to fetch event data client-side from/api/events/:idusing React hooks, improving scalability and error handling for missing or invalid events. Added loading and error states with user-friendly messaging and navigation. (frontend/app/events/[id]/page.tsxL1-R189, frontend/app/events/[id]/page.tsxL147-R198)EventImagecomponent to handle event poster images and graceful fallbacks, improving image handling and visual consistency.Event Card and Section Refactoring:
EventCardandEventSectioncomponents to a newcomponents/directory and updated imports throughout for clarity and maintainability. [1] [2] [3]EventCardto use theEventtype directly, compute date parts internally, and support clickable navigation to event detail pages. The registration button now opens the signup link in a new tab. [1] [2]EventSectionto pass event objects directly toEventCard, reducing prop complexity and improving code readability. [1] [2]Image Optimization and Configuration:
next.config.tsto allow Next.js to optimize images hosted on Supabase storage, enabling remote image loading for event posters.Other Fixes and Improvements:
SUPABASE_ANON_KEYinstead ofNEXT_PUBLIC_SUPABASE_ANON_KEY).These changes collectively modernize the event-related pages, improve maintainability, and provide a more robust and user-friendly experience.
Type of Change
Changes Made
Screenshots / Recordings
Testing
Checklist
feat:,fix:,refactor:)Related Issues
Additional Notes