Improve FAQ & video rendering, tighten homepage and CSS
This commit is contained in:
parent
05a1f316e1
commit
c69bb0d614
48 changed files with 4689 additions and 1077 deletions
|
|
@ -72,6 +72,7 @@ interface MapPageProps {
|
|||
isMobile?: boolean;
|
||||
initialTravelTime?: TravelTimeInitial;
|
||||
initialPostcode?: string;
|
||||
shareCode?: string;
|
||||
user?: { id: string; subscription: string; isAdmin?: boolean } | null;
|
||||
onLoginClick?: () => void;
|
||||
onRegisterClick?: () => void;
|
||||
|
|
@ -102,6 +103,7 @@ export default function MapPage({
|
|||
isMobile = false,
|
||||
initialTravelTime,
|
||||
initialPostcode,
|
||||
shareCode,
|
||||
user,
|
||||
onLoginClick,
|
||||
onRegisterClick,
|
||||
|
|
@ -192,6 +194,7 @@ export default function MapPage({
|
|||
viewFeature,
|
||||
activeFeature,
|
||||
travelTimeEntries: entries,
|
||||
shareCode,
|
||||
});
|
||||
|
||||
const handleAiFilterSubmit = useCallback(
|
||||
|
|
@ -352,18 +355,28 @@ export default function MapPage({
|
|||
[handleCurrentLocationSearch, isMobile]
|
||||
);
|
||||
|
||||
// For share-link recipients, "Continue with Demo" snaps back to the shared
|
||||
// coords (the area their link was meant to show), not the central-London
|
||||
// free-zone demo. Captured once on mount so a later URL rewrite by
|
||||
// useUrlSync (which tracks the user's current view) doesn't overwrite it.
|
||||
const shareReturnViewRef = useRef(shareCode ? initialViewState : null);
|
||||
const handleZoomToFreeZone = useCallback(() => {
|
||||
mapFlyToRef.current?.(
|
||||
INITIAL_VIEW_STATE.latitude,
|
||||
INITIAL_VIEW_STATE.longitude,
|
||||
INITIAL_VIEW_STATE.zoom
|
||||
);
|
||||
const target = shareReturnViewRef.current ?? INITIAL_VIEW_STATE;
|
||||
mapFlyToRef.current?.(target.latitude, target.longitude, target.zoom);
|
||||
}, []);
|
||||
|
||||
const pois = usePOIData(mapData.bounds, selectedPOICategories);
|
||||
const [isAreaGroupExpanded, toggleAreaGroup] = useCollapsibleGroups(true);
|
||||
|
||||
useUrlSync(mapData.currentView, filters, features, selectedPOICategories, rightPaneTab, entries);
|
||||
useUrlSync(
|
||||
mapData.currentView,
|
||||
filters,
|
||||
features,
|
||||
selectedPOICategories,
|
||||
rightPaneTab,
|
||||
entries,
|
||||
shareCode
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
mapData.setInitialView(initialViewState);
|
||||
|
|
@ -868,6 +881,7 @@ export default function MapPage({
|
|||
onRegisterClick={onRegisterClick ?? (() => {})}
|
||||
onStartCheckout={() => license.startCheckout()}
|
||||
onZoomToFreeZone={handleZoomToFreeZone}
|
||||
isShareReturn={!!shareReturnViewRef.current}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -996,6 +1010,7 @@ export default function MapPage({
|
|||
onRegisterClick={onRegisterClick ?? (() => {})}
|
||||
onStartCheckout={() => license.startCheckout()}
|
||||
onZoomToFreeZone={handleZoomToFreeZone}
|
||||
isShareReturn={!!shareReturnViewRef.current}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue