Jiny pristup k vytvareni letu, polofunkcni editace letu
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
export const flightName = (flight) => {
|
||||
const date = flight.takeoffDatetime;//.getDay() + ". " + flight.takeoffDatetime.getMonth() + ". " + flight.takeoffDatetime.getFullYear();
|
||||
if (flight.name !== '') {
|
||||
return `${flight.name} (${date}})`
|
||||
} else {
|
||||
return `${flight.takeoffAirport.icaoCode} - ${flight.takeoffAirport.icaoCode} (${date})`;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user