receptor/src/ui/main.js

28 lines
889 B
JavaScript
Raw Normal View History

2017-08-22 21:49:48 +02:00
import React, { Component } from 'react';
2017-08-25 04:49:24 +02:00
import { Route, DefaultRoute } from 'react-router';
import { connect } from 'react-redux';
2017-08-22 21:49:48 +02:00
import TorrentTable from './torrent_table';
2017-08-24 14:30:22 +02:00
import AddTorrent from './add_torrent';
import TorrentDetails from './torrent_details';
2017-08-25 04:49:24 +02:00
import Server from './server';
import ConnectionOverlay from './connection';
2017-08-22 21:49:48 +02:00
2017-09-08 04:06:49 +02:00
export default class Main extends Component {
2017-08-22 21:49:48 +02:00
render() {
return (
<div className="row">
<div className="col-md-8">
<TorrentTable />
</div>
2017-08-23 14:52:08 +02:00
<div className="col-md-4">
2017-09-07 10:37:11 +02:00
<Route exact path="/add-torrent" component={AddTorrent} />
<Route path="/add-torrent/:magnet" component={AddTorrent} />
2017-08-24 15:50:14 +02:00
<Route path="/torrents/:ids" component={TorrentDetails} />
2017-08-25 05:10:37 +02:00
<Route exact path="/" component={Server} />
2017-08-23 14:52:08 +02:00
</div>
2017-09-08 04:06:49 +02:00
<ConnectionOverlay />
2017-08-22 21:49:48 +02:00
</div>
);
}
}