commit 900a9f7f8ffef269bc5bd45095ea1e2fed29bf6b
parent 5e00e4788581f0eea7ec3d37bbbe4b6694cab1bc
Author: Agastya Chandrakant <me@hanabi.in>
Date: Mon, 18 May 2020 12:41:29 +0530
with more params, better variable names
Diffstat:
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/comp/currentTime.js b/src/comp/currentTime.js
@@ -5,10 +5,10 @@ import useTime from './helpers/useTime';
import prepData from './helpers/prepData';
function CurrentTime() {
- const [TZ, setTZ] = React.useState('UTC');
+ const [TZ2, setTZ2] = React.useState('UTC');
const { firstAbbr, fmtTime1, fmtTime2, firstTZ, secondAbbr } = prepData(
useTime(),
- TZ
+ TZ2
);
return (
<div className="time-conversion">
@@ -19,7 +19,12 @@ function CurrentTime() {
</h4>
</div>
<div className="col" id="converted-time-lbl-box">
- <AutoCompleteText defaultValue={TZ} changeValue={setTZ} />
+ <AutoCompleteText
+ changeValue={setTZ2}
+ defaultValue={TZ2}
+ id="converted-time-lbl-input"
+ placeholder="Time zone"
+ />
</div>
</div>
<div className="row" id="times">