2018-11-27 21:29:56 +00:00
|
|
|
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
|
|
|
|
2018-11-27 21:29:56 +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');
|
|
|
|
|
2018-11-27 21:29:56 +00:00
|
|
|
class Index extends Component<any, any> {
|
2018-10-11 22:20:17 +00:00
|
|
|
render() {
|
|
|
|
return (
|
2018-11-29 04:36:12 +00:00
|
|
|
<HashRouter>
|
2018-12-01 19:11:00 +00:00
|
|
|
<Navbar />
|
2018-12-01 22:47:14 +00:00
|
|
|
<div class="mt-3 p-0">
|
2018-11-29 04:36:12 +00:00
|
|
|
<Switch>
|
|
|
|
<Route exact path="/" component={Home} />
|
2019-02-06 01:23:45 +00:00
|
|
|
<Route path={`/search/:type_/:q/:page`} component={Search} />
|
2018-11-29 04:36:12 +00:00
|
|
|
</Switch>
|
|
|
|
</div>
|
|
|
|
</HashRouter>
|
2018-11-27 21:29:56 +00:00
|
|
|
)
|
2018-10-11 22:20:17 +00:00
|
|
|
}
|
2018-10-11 21:59:30 +00:00
|
|
|
}
|
2018-11-27 21:29:56 +00:00
|
|
|
render(<Index />, container);
|