diff --git a/src/js/components/root.js b/src/js/components/root.js
index 8fd786b..f931642 100644
--- a/src/js/components/root.js
+++ b/src/js/components/root.js
@@ -5,8 +5,10 @@ import { HeaderBar } from "./lib/header-bar.js"
class ElevatorWidget extends Component {
render() {
- return (
- Elevator info
+ return (
+
BART Info - Elevator status
+ Route planner
+ No elevators are known to be out of service.
);
}
}
@@ -39,14 +41,13 @@ class TimeScheduleWidget extends Component {
}
}
-
-export class Root extends Component {
+class RoutePlanner extends Component {
constructor(props) {
super(props);
- this.state = store.state;
- store.setStateHandler((newState) => {
- this.setState(newState);
- });
+ this.state = {
+ fromStation: null,
+ toStation: null,
+ };
}
stationSearch() {
@@ -64,7 +65,7 @@ export class Root extends Component {
}
renderStationOptions() {
- const stations = this.state.stations || [];
+ const stations = this.props.stations;
return _.map(stations, (station) => {
const abbr = station.abbr;
const name = station.name;
@@ -87,32 +88,48 @@ export class Root extends Component {
);
}
+ render() {
+ return (
+
+
BART Info
+
Elevator information
+
+
+
+
+
+
+
+
+ Search scheduled trains:
+ { this.renderStationForm() }
+
+
+
+ );
+ }
+}
+
+
+export class Root extends Component {
+ constructor(props) {
+ super(props);
+ this.state = store.state;
+ store.setStateHandler((newState) => {
+ this.setState(newState);
+ });
+ }
+
render() {
return (
-
-
}/>
- {
- return (
-
-
BART Info
-
Elevator information
-
-
-
-
-
-
-
-
- Search scheduled trains:
- { this.renderStationForm() }
-
-
-
- )}}
- />
+
+ }/>
+
+ } />
)