From f10946b96deba27f2f4eef4b32242320b977b3c7 Mon Sep 17 00:00:00 2001
From: ronreg-ribdev <56719257+ronreg-ribdev@users.noreply.github.com>
Date: Fri, 5 Jun 2020 02:42:25 -0700
Subject: [PATCH] Do some js parsing
---
src/js/components/root.js | 18 +++++++++++++++---
urbit/app/bartinfo.hoon | 9 +++++++--
2 files changed, 22 insertions(+), 5 deletions(-)
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 ;}) }
: