Updated class changes in TrafficEntry

This commit is contained in:
André Wahlberg 2020-12-04 11:47:42 +01:00
parent 4e36270130
commit 25d66f9195

View File

@ -7,8 +7,8 @@ import warningIcon from '../img/warning.svg';
class TrafficEntry extends Component {
render() {
let trafficInfo = this.props.departure.info;
let lineInterference = trafficInfo !== "" && trafficInfo !== null;
let trafficInfo = this.props.departure.trafficInfo;
let lineInterference = trafficInfo !== "" && trafficInfo !== null && trafficInfo !== undefined;
return (
<div className="trafficEntry">
@ -23,7 +23,7 @@ class TrafficEntry extends Component {
<div>
<span className="lineName">{this.props.departure.lineName}</span>
<img src={busIcon} alt=""></img>
<span className="destination">{this.props.departure.destination}</span>
<span className="destination">{this.props.departure.finalStop}</span>
</div>
{lineInterference &&
<p>{trafficInfo} <u>Visa mer</u></p>