Update city radius values and add Miami; refine map styles and improve OpenSky code readability

This commit is contained in:
Kewonit
2026-02-14 16:39:17 +05:30
parent bea74cc70f
commit 0f8012361f
13 changed files with 4647 additions and 196 deletions

View File

@ -1,6 +1,6 @@
"use client";
import { useRef, useMemo } from "react";
import { useState, useMemo } from "react";
import type { FlightState } from "@/lib/opensky";
type Position = [lng: number, lat: number];
@ -141,7 +141,6 @@ class TrailStore {
}
export function useTrailHistory(flights: FlightState[]): TrailEntry[] {
const storeRef = useRef<TrailStore>(null);
if (!storeRef.current) storeRef.current = new TrailStore();
return useMemo(() => storeRef.current!.update(flights), [flights]);
const [store] = useState(() => new TrailStore());
return useMemo(() => store.update(flights), [flights, store]);
}