Refactor project structure and dependencies; rename package to azaion-ui, update version to 0.0.1, and remove unused files. Introduce new routing and authentication features in App component.

This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-03-25 03:10:15 +02:00
parent e407308284
commit 157a33096a
112 changed files with 6530 additions and 17843 deletions
+35
View File
@@ -0,0 +1,35 @@
import { MapContainer, TileLayer, Marker, Polyline, Popup } from 'react-leaflet'
import type { Waypoint } from '../../types'
import 'leaflet/dist/leaflet.css'
import L from 'leaflet'
const icon = L.divIcon({ className: 'bg-az-orange rounded-full w-3 h-3 border border-white', iconSize: [12, 12] })
interface Props {
waypoints: Waypoint[]
}
export default function FlightMap({ waypoints }: Props) {
const center: [number, number] = waypoints.length > 0
? [waypoints[0].latitude, waypoints[0].longitude]
: [50.45, 30.52]
const positions = waypoints
.sort((a, b) => a.order - b.order)
.map(w => [w.latitude, w.longitude] as [number, number])
return (
<MapContainer center={center} zoom={13} className="h-full w-full" key={center.join(',')}>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OSM</a>'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
{waypoints.map(wp => (
<Marker key={wp.id} position={[wp.latitude, wp.longitude]} icon={icon}>
<Popup>{wp.name}</Popup>
</Marker>
))}
{positions.length > 1 && <Polyline positions={positions} color="#fd7e14" weight={2} />}
</MapContainer>
)
}