All files / applications/go-by-transit/src/view/stop/component StopLocationArrivalRow.tsx

75% Statements 3/4
50% Branches 1/2
100% Functions 1/1
75% Lines 3/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32                        6x   6x       6x                          
import React from "react";
import { Arrival } from "../../../api/trimet/interfaces/arrivals";
import ArrivalRow from "../../arrivals/components/ArrivalRow";
import Loading from "../../loading/Loading";
 
interface Props {
  locationId?: number;
  arrival: Arrival;
}
 
export default class StopLocationView extends React.Component<Props> {
  public render() {
    const { arrival } = this.props;
 
    Iif (!arrival) {
      return <Loading />;
    }
 
    return (
      <ArrivalRow
        scheduled={arrival.scheduled}
        estimated={arrival.estimated}
        feet={arrival.feet}
        routeId={arrival.route}
        shortSign={arrival.shortSign}
        now={Date.now()}
        onRouteIndicatorClick={undefined}
      />
    );
  }
}