feat: implement full flight history tracking and enhance trail rendering (#11)

* feat: implement full flight history tracking and enhance trail rendering

* feat: enhance flight tracking logic and improve path handling

* feat: implement airline logo caching and error handling in flight components

* feat: enhance flight tracking logic to improve waypoint handling and connection logic

* feat: refactor longitude handling and improve flight tracking logic

* feat: improve longitude handling and enhance airline logo failure tracking
This commit is contained in:
kew
2026-02-22 18:40:52 +05:30
committed by GitHub
parent a08f1c7250
commit 3a10da0486
14 changed files with 1123 additions and 76 deletions

View File

@ -18,8 +18,17 @@ export function MapAttribution({ styleId }: MapAttributionProps) {
const toggle = useCallback(() => setExpanded((prev) => !prev), []);
// Expand by default on larger screens (after mount to avoid hydration mismatch)
useEffect(() => {
setExpanded(window.innerWidth >= SM_BREAKPOINT);
const mq = window.matchMedia(`(min-width: ${SM_BREAKPOINT}px)`);
const sync = () => setExpanded(mq.matches);
const raf = window.requestAnimationFrame(sync);
mq.addEventListener("change", sync);
return () => {
window.cancelAnimationFrame(raf);
mq.removeEventListener("change", sync);
};
}, []);
// Close on outside click for small screens