You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
42 lines
1.2 KiB
import React, { FC } from 'react'
|
|
import { HashRouter as Router, Route, Link } from 'react-router-dom'
|
|
|
|
import Home from '../pages/home'
|
|
|
|
import './app.scss'
|
|
|
|
interface Props {
|
|
menuCollapsed: boolean
|
|
fetching: boolean
|
|
}
|
|
|
|
const App: FC<Props> = ({ menuCollapsed, fetching }) => {
|
|
const mainMenuWidth = 300
|
|
const mainColumnLeftMargin = menuCollapsed ? 0 : mainMenuWidth
|
|
|
|
return (
|
|
<Router>
|
|
<div>
|
|
<div id="main-menu" style={{ width: mainMenuWidth }}>
|
|
<h1 className="is-size-2">
|
|
<Link className="has-text-white" to="/">flxr</Link>
|
|
</h1>
|
|
|
|
<hr className="has-background-grey-lighter" />
|
|
|
|
<p>
|
|
<Link className="has-text-white" to="/">Timeline</Link>
|
|
</p>
|
|
</div>
|
|
|
|
<div id="main-column" style={{ marginLeft: mainColumnLeftMargin }}>
|
|
<Route exact path="/" component={Home} />
|
|
<Route path="/login" component={Home} />
|
|
<Route path="/signup" component={Home} />
|
|
</div>
|
|
</div>
|
|
</Router>
|
|
)
|
|
}
|
|
|
|
export default App
|