commit 35c71ba7b15c8c75b2d1779413bec6a080e7d151
parent 0e3c626056dd46c3695f5ca3fa32ff111a5b8831
Author: Agastya Chandrakant <acagastya@outlook.com>
Date: Mon, 25 May 2020 06:35:38 +0530
prep the index to support currentconvertor
Diffstat:
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/App/index.tsx b/src/App/index.tsx
@@ -6,14 +6,22 @@ import Footer from './comps/Footer';
import Header from './comps/Header';
import { DEFAULT_TZ, localTimezone } from '../utils';
+import useTime from '../utils/useTime';
function App<never>(): JSX.Element {
- const [timezone1, setTimezone1] = React.useState(localTimezone);
- const [timezone2, setTimezone2] = React.useState(DEFAULT_TZ);
+ const now = useTime();
+ const [timezone1, setTimezone1] = React.useState(DEFAULT_TZ);
+ const [timezone2, setTimezone2] = React.useState(localTimezone);
return (
<div className="container-fluid">
<Header />
- <CurrentConvertor />
+ <CurrentConvertor
+ time={now}
+ TZ1={timezone1}
+ TZ2={timezone2}
+ setTZ1={setTimezone1}
+ setTZ2={setTimezone2}
+ />
<Footer />
</div>
);