Mixonomer/src/js/Playlist/Playlists.js

28 lines
1.0 KiB
JavaScript
Raw Normal View History

import React, { Component } from "react";
2019-07-31 20:31:01 +01:00
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
const axios = require('axios');
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";
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>
</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>
</div>
);
}
}
export default Playlists;