Components
Renders multiple routes in batch with shared defaults and per-route overrides.

"use client";
import { FlightRoutes, Map } from "@/components/ui/flightcn-flight-routes";
const settings = {
center: [118, 18],
zoom: 2.05,
showAirports: true,
showLabel: true,
hoverEffect: true,
};
export default function DefaultFlightRoutesDemo(
props: Partial<typeof settings>,
) {
const s = { ...settings, ...props };
return (
<div className="h-screen w-screen flex items-center justify-center overflow-hidden bg-background p-8">
<div className="h-[420px] w-full max-w-4xl overflow-hidden rounded-lg border bg-background shadow-sm">
<Map center={s.center} zoom={s.zoom}>
<FlightRoutes
routes={[
{ from: "TPE", to: "HND" },
{ from: "TPE", to: "SIN" },
{ from: "TPE", to: "BKK" },
]}
showAirports={s.showAirports}
showLabel={s.showLabel}
hoverEffect={s.hoverEffect}
tripType="round-trip"
lineStyle="solid"
animate={{ duration: 7000 }}
/>
</Map>
</div>
</div>
);
}
export { DefaultFlightRoutesDemo };