Add: Traffic info now shows disruption data as well. Format of new time needs to be rewritten
This commit is contained in:
@ -20,13 +20,18 @@ class DisruptionButton extends Button {
|
||||
if(this.state.jsonLocation === "ex1"){
|
||||
for (let stopPoint of ex1.affectedStopPoints) {
|
||||
if(stopPoint.gid === globData.user.stoppointgid){
|
||||
this.state.disruption = ex1
|
||||
this.state.disruption = ex1;
|
||||
console.log(globData.stop.departures[0])
|
||||
globData.stop.departures[0].newTime = ex1.time
|
||||
globData.stop.departures[0].trafficInfo = ex1.title;
|
||||
}
|
||||
}
|
||||
} else if (this.state.jsonLocation === "ex2"){
|
||||
for (let stopPoint of ex2.affectedStopPoints) {
|
||||
if(stopPoint.gid === globData.user.stoppointgid){
|
||||
this.state.disruption = ex2
|
||||
globData.stop.departures[0].newTime = ex2.time
|
||||
globData.stop.departures[0].trafficInfo = ex2.title;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user