riorganizzazione files, gestione id videoplayer e videoinfo

This commit is contained in:
matteo
2018-11-24 01:41:45 +01:00
parent d33876d1e7
commit bb71bf270c
12 changed files with 122 additions and 80 deletions
+5 -4
View File
@@ -6,7 +6,7 @@ import VideoList from './VideoList'; // eslint-disable-line no-unused-vars
import TopBar from './TopBar'; // eslint-disable-line no-unused-vars
import VideoPlayer from './VideoPlayer'; // eslint-disable-line no-unused-vars
import VideoInfo from './VideoInfo';
import './App.css';
import './css/App.css';
class App extends React.Component {
render() {
@@ -18,16 +18,17 @@ class App extends React.Component {
<Row className="justify-content-center bg-black">
<Col xs="12" sm="6">
<Switch>
<Route path="/video/:id" component={VideoPlayer} />
<Route component={VideoPlayer} />
<Route path={["/video/:id",'']} component={VideoPlayer} />
{/* <Route component={VideoPlayer} /> */}
{/* <Route path='/search/:q/:token?' component={Search} /> */}
</Switch>
</Col>
</Row>
<Row className='scrollable'>
<Switch>
<Route path="/video/:id" component={VideoInfo} />
<Route path={["/video/:id","/search/:query"]} component={VideoInfo} />
<Route exact path='/' component={VideoList} />
<Route render={() => <div>URL not found</div>}/>
</Switch>
</Row>
</React.Fragment>