diff --git a/src/js/components/root.js b/src/js/components/root.js index 80fb691..dcc5441 100644 --- a/src/js/components/root.js +++ b/src/js/components/root.js @@ -3,6 +3,16 @@ import { BrowserRouter, Route, Link } from "react-router-dom"; import _ from 'lodash'; import { HeaderBar } from "./lib/header-bar.js" +function padNumber(number) { + if (number == 0) { + return "00"; + } + if (number <= 9) { + return `0${number}` + } + return number.toString(); +} + function isSundaySchedule(curTime) { // Deliberately switch over the effective day in the middle of the // night. @@ -195,7 +205,7 @@ class RouteSearch extends Component { value={this.state.hour} onChange={(evt) => this.setState({hour: parseInt(evt.target.value)}) } disabled={departNow} > - { _.map(_.range(1, 13), (hour) => { return ;}) } + { _.map(_.range(1, 13), (hour) => { return ;}) } : +
+ +
); } } diff --git a/urbit/app/bartinfo.hoon b/urbit/app/bartinfo.hoon index e7eecb1..4692124 100644 --- a/urbit/app/bartinfo.hoon +++ b/urbit/app/bartinfo.hoon @@ -113,7 +113,6 @@ [%give %fact ~[/elevators] %json !>(update)]~ :: [%routeplan *] - ~& client-response.sign-arvo =/ value=json (parse-routeplan-response:cc client-response.sign-arvo) ?> ?=(%o -.value) =/ update=json (pairs:enjs:format [update+o+p.value ~]) @@ -214,7 +213,13 @@ ++ parse-routeplan-response |= response=client-response:iris ^- json - (with-json-handler response |=(x=json x)) + =, format + =/ handler + |= jon=json + ~& jon + =/ root=json ((ot:dejs [['root' same] ~]) jon) + root + (with-json-handler response handler) ++ poke-handle-json |= jon=json ^- (list card)