Working on email templating, updating with swagger
This commit is contained in:
@@ -151,10 +151,10 @@ function AirportInfoRow({ style, children }: { style?: CSSProperties; children:
|
||||
);
|
||||
}
|
||||
|
||||
function AirportInfo({ map, airport }: { map: LeafletMap, airport: Airport }) {
|
||||
function AirportInfo({ map, airport }: { map: LeafletMap; airport: Airport }) {
|
||||
function goToLocation(map: LeafletMap, latitude: number, longitude: number) {
|
||||
if (!map) return
|
||||
map.setView([latitude, longitude], map.getZoom())
|
||||
if (!map) return;
|
||||
map.setView([latitude, longitude], map.getZoom());
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -171,9 +171,11 @@ function AirportInfo({ map, airport }: { map: LeafletMap, airport: Airport }) {
|
||||
</AirportInfoSlot>
|
||||
<AirportInfoSlot title={'Elevation'} style={{ paddingLeft: '1rem' }} children={`${airport.elevation_ft} ft`} />
|
||||
<AirportInfoSlot style={{ marginLeft: 'auto', paddingLeft: '1rem', paddingTop: '0.5rem' }}>
|
||||
<UnstyledButton onClick={() => {
|
||||
goToLocation(map, airport.latitude, airport.longitude)
|
||||
}}>
|
||||
<UnstyledButton
|
||||
onClick={() => {
|
||||
goToLocation(map, airport.latitude, airport.longitude);
|
||||
}}
|
||||
>
|
||||
<IconViewfinder />
|
||||
</UnstyledButton>
|
||||
</AirportInfoSlot>
|
||||
@@ -181,9 +183,7 @@ function AirportInfo({ map, airport }: { map: LeafletMap, airport: Airport }) {
|
||||
<Accordion chevronPosition={'right'} variant={'contained'}>
|
||||
{airport.runways != null && airport.runways.length > 0 && (
|
||||
<Accordion.Item value={'runways'}>
|
||||
<Accordion.Control>
|
||||
Runways
|
||||
</Accordion.Control>
|
||||
<Accordion.Control>Runways</Accordion.Control>
|
||||
<Accordion.Panel>
|
||||
<RunwayTable runways={airport.runways} />
|
||||
</Accordion.Panel>
|
||||
@@ -191,9 +191,7 @@ function AirportInfo({ map, airport }: { map: LeafletMap, airport: Airport }) {
|
||||
)}
|
||||
{airport.communications != null && airport.communications.length > 0 && (
|
||||
<Accordion.Item value={'communication'}>
|
||||
<Accordion.Control>
|
||||
Communication
|
||||
</Accordion.Control>
|
||||
<Accordion.Control>Communication</Accordion.Control>
|
||||
<Accordion.Panel>
|
||||
<CommunicationTable communications={airport.communications} />
|
||||
</Accordion.Panel>
|
||||
|
||||
Reference in New Issue
Block a user