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

28 lines
695 B
TypeScript
Raw Normal View History

import { render, Component } from 'inferno';
import { HashRouter, Route, Switch, Link } 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 (
<HashRouter>
<div>
<Navbar />
<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);