torrents.csv/server/ui/src/index.tsx

28 lines
673 B
TypeScript
Raw Normal View History

import { render, Component } from 'inferno';
2018-11-28 01:16:29 +00:00
import { HashRouter, Route, Switch } from 'inferno-router';
2018-10-11 21:59:30 +00:00
import { Navbar } from './components/navbar';
import { Home } from './components/home';
import { Search } from './components/search';
2018-10-11 21:59:30 +00:00
import './Main.css';
const container = document.getElementById('app');
class Index extends Component<any, any> {
render() {
return (
2018-11-29 04:36:12 +00:00
<HashRouter>
<div>
<Navbar />
2018-11-29 04:36:12 +00:00
<Switch>
<Route exact path="/" component={Home} />
<Route path={`/search/:q/:page`} component={Search} />
</Switch>
</div>
</HashRouter>
)
}
2018-10-11 21:59:30 +00:00
}
render(<Index />, container);