diff --git a/src/js/components/root.js b/src/js/components/root.js index f931642..be835f6 100644 --- a/src/js/components/root.js +++ b/src/js/components/root.js @@ -4,11 +4,26 @@ import _ from 'lodash'; import { HeaderBar } from "./lib/header-bar.js" class ElevatorWidget extends Component { + + statuses() { + const elevatorStatuses = this.props.elevatorStatuses; + if (elevatorStatuses.length === 0) { + return

No elevators are known to be out of service.

; + } + return (
+ { _.map(elevatorStatuses, (st, idx) => { + const desc = st.description['#cdata-section']; + return

{desc}

; + }) + } +
); + } + render() { return (

BART Info - Elevator status

Route planner - No elevators are known to be out of service. + { this.statuses() }
); } } @@ -125,7 +140,10 @@ export class Root extends Component {
- }/> + + }/>