Skip to content
Snippets Groups Projects
FlightCard.tsx 597 B
Newer Older
import { Link } from 'react-router-dom';
import './FlightCard.scss';

interface IFlight {
  id: number;
  flightNumber: string;
  flightPath: string;
  flightPathFull: string;
}

interface IFlightCard {
  flight: IFlight;
}

function FlightCard({ flight }: IFlightCard) {
  return (
    <>
      <div className='flight-card'>
        <span>{flight.flightNumber}</span>
        <span className='flight-path'>{flight.flightPath}</span>
        <span>{flight.flightPathFull}</span>
        <Link to={'/flights/' + flight.id}>View Flight</Link>
      </div>
    </>
  );
}