2019-07-29 11:44:10 +01:00
|
|
|
import React, { Component } from "react";
|
2019-07-31 20:31:01 +01:00
|
|
|
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
2019-07-29 11:44:10 +01:00
|
|
|
const axios = require('axios');
|
|
|
|
|
2019-07-30 16:25:01 +01:00
|
|
|
import PlaylistsView from "./PlaylistsView.js"
|
2019-07-31 20:31:01 +01:00
|
|
|
import NewPlaylist from "./NewPlaylist.js";
|
2019-08-12 00:34:04 +01:00
|
|
|
import ScratchView from "./ScratchView.js";
|
2019-07-29 11:44:10 +01:00
|
|
|
|
2019-07-30 16:25:01 +01:00
|
|
|
class Playlists extends Component {
|
|
|
|
render(){
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<ul className="navbar" style={{width: "100%"}}>
|
2019-07-31 20:31:01 +01:00
|
|
|
<li><Link to={`${this.props.match.url}/new`}>new</Link></li>
|
2019-08-12 00:34:04 +01:00
|
|
|
<li><Link to={`${this.props.match.url}/play`}>play</Link></li>
|
2019-07-30 16:25:01 +01:00
|
|
|
</ul>
|
|
|
|
|
2019-07-31 20:31:01 +01:00
|
|
|
<Switch>
|
|
|
|
<Route exact path={`${this.props.match.url}/`} component={PlaylistsView} />
|
|
|
|
<Route path={`${this.props.match.url}/new`} component={NewPlaylist} />
|
2019-08-12 00:34:04 +01:00
|
|
|
<Route path={`${this.props.match.url}/play`} component={ScratchView} />
|
2019-07-31 20:31:01 +01:00
|
|
|
</Switch>
|
2019-07-30 16:25:01 +01:00
|
|
|
</div>
|
|
|
|
);
|
2019-07-29 11:44:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Playlists;
|