diff --git a/src/app/room/[slug]/page.tsx b/src/app/room/[slug]/page.tsx index 6ea3cbf..25c2dc7 100644 --- a/src/app/room/[slug]/page.tsx +++ b/src/app/room/[slug]/page.tsx @@ -8,6 +8,7 @@ import { useLocationSharing } from '@/hooks/useLocationSharing'; import ParticipantList from '@/components/room/ParticipantList'; import RoomHeader from '@/components/room/RoomHeader'; import ShareModal from '@/components/room/ShareModal'; +import MeetingPointModal from '@/components/room/MeetingPointModal'; import type { Participant, ParticipantLocation } from '@/types'; // Dynamic import for map to avoid SSR issues with MapLibre @@ -27,6 +28,7 @@ export default function RoomPage() { const [showShare, setShowShare] = useState(false); const [showParticipants, setShowParticipants] = useState(true); + const [showMeetingPoint, setShowMeetingPoint] = useState(false); const [currentUser, setCurrentUser] = useState<{ name: string; emoji: string } | null>(null); const [selectedParticipant, setSelectedParticipant] = useState(null); @@ -201,6 +203,7 @@ export default function RoomPage() { {/* Map */} { + console.log('Waypoint clicked:', w.name); + }} /> {/* Participant Panel */} @@ -218,6 +224,7 @@ export default function RoomPage() { currentUserId={currentUser.name} onClose={() => setShowParticipants(false)} onNavigateTo={handleNavigateTo} + onSetMeetingPoint={() => setShowMeetingPoint(true)} /> )} @@ -234,6 +241,18 @@ export default function RoomPage() { {showShare && ( setShowShare(false)} /> )} + + {/* Meeting Point Modal */} + {showMeetingPoint && ( + setShowMeetingPoint(false)} + onSetMeetingPoint={(waypoint) => { + addWaypoint(waypoint); + setShowMeetingPoint(false); + }} + /> + )} ); } diff --git a/src/components/map/DualMapView.tsx b/src/components/map/DualMapView.tsx index bca8383..a570366 100644 --- a/src/components/map/DualMapView.tsx +++ b/src/components/map/DualMapView.tsx @@ -2,7 +2,7 @@ import { useState, useEffect, useCallback } from 'react'; import dynamic from 'next/dynamic'; -import type { Participant, MapViewport } from '@/types'; +import type { Participant, MapViewport, Waypoint } from '@/types'; import { isInC3NavArea } from '@/lib/c3nav'; // Dynamic imports to avoid SSR issues @@ -28,11 +28,13 @@ type MapMode = 'outdoor' | 'indoor' | 'auto'; interface DualMapViewProps { participants: Participant[]; + waypoints?: Waypoint[]; currentUserId?: string; currentLocation?: { latitude: number; longitude: number } | null; eventId?: string; initialMode?: MapMode; onParticipantClick?: (participant: Participant) => void; + onWaypointClick?: (waypoint: Waypoint) => void; } // CCC venue bounds (Hamburg Congress Center) @@ -45,11 +47,13 @@ const CCC_BOUNDS = { export default function DualMapView({ participants, + waypoints = [], currentUserId, currentLocation, eventId = '38c3', initialMode = 'auto', onParticipantClick, + onWaypointClick, }: DualMapViewProps) { const [mode, setMode] = useState(initialMode); const [activeView, setActiveView] = useState<'outdoor' | 'indoor'>('outdoor'); @@ -86,8 +90,10 @@ export default function DualMapView({ {activeView === 'outdoor' ? ( ) : ( +
You're at the venue! + ))} +
+ + + {/* Location options */} +
+ + + {currentLocation && ( + + )} + + + + {!useCurrentLocation && ( +
+
+ + setCustomLat(e.target.value)} + placeholder="53.5550" + className="w-full bg-white/10 border border-white/20 rounded-lg px-3 py-2 text-white text-sm placeholder:text-white/40 focus:outline-none focus:border-rmaps-primary" + /> +
+
+ + setCustomLng(e.target.value)} + placeholder="9.9898" + className="w-full bg-white/10 border border-white/20 rounded-lg px-3 py-2 text-white text-sm placeholder:text-white/40 focus:outline-none focus:border-rmaps-primary" + /> +
+
+ )} + + {!hasLocation && !useCurrentLocation && ( +

+ Share your location first, or enter coordinates manually +

+ )} +
+ + {/* Actions */} +
+ + +
+ + + + ); +} diff --git a/src/components/room/ParticipantList.tsx b/src/components/room/ParticipantList.tsx index e584778..c6d78c4 100644 --- a/src/components/room/ParticipantList.tsx +++ b/src/components/room/ParticipantList.tsx @@ -7,6 +7,7 @@ interface ParticipantListProps { currentUserId?: string; onClose: () => void; onNavigateTo: (participant: Participant) => void; + onSetMeetingPoint?: () => void; } export default function ParticipantList({ @@ -14,6 +15,7 @@ export default function ParticipantList({ currentUserId, onClose, onNavigateTo, + onSetMeetingPoint, }: ParticipantListProps) { const formatDistance = (participant: Participant, current: Participant | undefined) => { if (!participant.location || !current?.location) return null; @@ -142,7 +144,10 @@ export default function ParticipantList({ {/* Footer actions */}
-