diff --git a/src/components/HistorySelect.jsx b/src/components/HistorySelect.jsx index bc8e0cf4..c68c540a 100644 --- a/src/components/HistorySelect.jsx +++ b/src/components/HistorySelect.jsx @@ -21,7 +21,8 @@ async function getTimes(day, canvasId) { return []; } const times = await response.json(); - const parsedTimes = times.map((a) => `${a.substr(0, 2)}:${a.substr(-2, 2)}`); + const parsedTimes = times + .map((a) => `${a.substr(0, 2)}:${a.substr(-2, 2)}`); return parsedTimes; } catch { return []; @@ -41,7 +42,7 @@ class HistorySelect extends React.Component { this.state = { submitting: false, - selectedDate: new Date(), + selectedDate: null, max, }; @@ -59,6 +60,7 @@ class HistorySelect extends React.Component { this.setState({ submitting: true, + times: [], }); const { canvasId, @@ -99,14 +101,15 @@ class HistorySelect extends React.Component {
{ (times && times.length > 0) ? ( - setTime(selectedDate, e.target.value)}> {times.map((value) => ( ))} ) - :

Select Date

} + : null } { (submitting) ?

Loading...

: null } + { (!selectedDate && !submitting) ?

Select Date above

: null }
); diff --git a/src/components/base.tcss b/src/components/base.tcss index 103a39a7..1f883516 100644 --- a/src/components/base.tcss +++ b/src/components/base.tcss @@ -180,9 +180,8 @@ kbd { background-color: rgba(226, 226, 226, 0.80); color: black; font-size: 14px; - line-height: 30px; + line-height: 26px; text-align: center; - vertical-align: middle; border: solid black; border-width: thin; padding: 0 24px;