time-convertor

Convert time across timezones
git clone http://git.hanabi.in/repos/time-convertor.git
Log | Files | Refs | README | LICENSE

commit a9eb6e7b4a881835f4545ff69e2bc6eb60ef775f
parent 9b3afeff49e172110d4cef7043d9cc0f1c3079a4
Author: Agastya Chandrakant <me@hanabi.in>
Date:   Mon, 18 May 2020 05:53:23 +0530

move main to subpages dir

Diffstat:
Msrc/App.js | 17+++++++++--------
Asrc/subpages/help.js | 15+++++++++++++++
Asrc/subpages/main.js | 17+++++++++++++++++
3 files changed, 41 insertions(+), 8 deletions(-)

diff --git a/src/App.js b/src/App.js @@ -1,17 +1,18 @@ import React from 'react'; +import { Route, BrowserRouter as Router, Switch } from 'react-router-dom'; import 'bootstrap/dist/css/bootstrap.min.css'; -import CurrentTime from './comp/currentTime'; -import Footer from './comp/footer'; -import Header from './comp/header'; +import Help from './subpages/help'; +import Main from './subpages/main'; function App() { return ( - <div className="container-fluid"> - <Header /> - <CurrentTime /> - <Footer /> - </div> + <Router> + <Switch> + <Route component={Help} path="/help" /> + <Route component={Main} path="/" /> + </Switch> + </Router> ); } diff --git a/src/subpages/help.js b/src/subpages/help.js @@ -0,0 +1,15 @@ +import React from 'react'; +import Footer from '../comp/footer'; +import Header from '../comp/header'; + +function Help() { + return ( + <div className="container-fluid"> + <Header /> + This is help + <Footer /> + </div> + ); +} + +export default Help; diff --git a/src/subpages/main.js b/src/subpages/main.js @@ -0,0 +1,17 @@ +import React from 'react'; + +import CurrentTime from '../comp/currentTime'; +import Footer from '../comp/footer'; +import Header from '../comp/header'; + +function Main() { + return ( + <div className="container-fluid"> + <Header /> + <CurrentTime /> + <Footer /> + </div> + ); +} + +export default Main;