mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 13:10:29 +00:00
test: hold the audit follow-ups to the test, lint, theme and size ratchets
The packing row tests read the TREK tooltip and the accessible name instead of the title the badges no longer carry, the journey delete suite takes its service from the module over a snapshot db and seeds through the row factories, the storage notifier suite builds its subject once, the POI layer follows the view only while it has POIs, the collections repository reads the list's places through its own query, and the baselines the moved code left smaller come down with it.
This commit is contained in:
@@ -77,14 +77,17 @@ export default function PoiMarkers({
|
||||
}) {
|
||||
const map = useMap();
|
||||
const [frame, setFrame] = useState<LngFrame | null>(null);
|
||||
// Followed only while there are POIs to draw, so a map without them keeps no listeners.
|
||||
const tracking = pois.length > 0;
|
||||
useEffect(() => {
|
||||
if (!tracking) return undefined;
|
||||
const follow = () => setFrame((current) => viewLngFrame(current, map.getCenter().lng));
|
||||
map.whenReady(follow);
|
||||
map.on('moveend', follow);
|
||||
return () => {
|
||||
map.off('moveend', follow);
|
||||
};
|
||||
}, [map]);
|
||||
}, [map, tracking]);
|
||||
// Native clicks keep the newest handler without rebuilding every marker.
|
||||
const clickRef = useRef(onPoiClick);
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user