feat: integrate interactive event map with React Leaflet (Closes #1139) - #1207
Open
waterWang wants to merge 1 commit into
Open
feat: integrate interactive event map with React Leaflet (Closes #1139)#1207waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
…a-Events#1139) - Adds EventMap component with React Leaflet MapContainer, markers, popups - Adds EventMapClient (dynamic SSR-off wrapper for Next.js) - Updates discover API route to return lat/lon for events - Updates DiscoverEvent type with latitude/longitude fields - Integrates EventMap into Map Discovery page (replaces placeholder) - Loading/error/empty states with retry mechanism - fitBounds to auto-adjust map viewport to event markers - Vitest config fix: NODE_ENV=test to avoid React.act production build issue - 11 tests covering all states
|
@waterWang is attempting to deploy a commit to the oseh-svg's projects Team on Vercel. A member of the Team first needs to authorize it. |
5 tasks
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.
Summary
This PR integrates an interactive event map into the Map Discovery page using React Leaflet (already a project dependency). Events with WGS84 coordinates render as markers with detailed popups.
Changes
EventMapcomponent (components/events/event-map.tsx): React Leaflet map with:FitBounds— viewport auto-adjusts to all event markersinitialEventsprop for server-side pre-fetchingEventMapClient: dynamic SSR-off wrapper (Next.js leaflet compatibility)app/api/events/discover/route.ts): now returnslatitude/longitudefor each eventDiscoverEventtype: addslatitude/longitudefieldsmap-discovery-page.tsx): placeholder replaced with liveEventMapClientAcceptance Criteria
Dependencies
/discover/maproute from ## FRONTEND: Create Map Discovery Page #1138 (PR feat: add Map Discovery page with responsive layout and loading states (Closes #1138) #1206)