Commit 5fbf6692 authored by Fence's avatar Fence 🌈

some stuff that was lying around

parent 282d009a
......@@ -21,8 +21,8 @@ export default class App extends React.Component {
<Navbar />
<Router>
<Switch>
<Route path="/" component={HomePage} />
<Route path="/" component={SongListPage} />
<Route path="/" exact component={HomePage} />
<Route path="/resources/songs" component={SongListPage} />
</Switch>
</Router>
</div>
......
39195
\ No newline at end of file
......@@ -37,7 +37,7 @@ export default class LoginContainer extends React.Component {
}).then(resp => resp.json()).then((data) => {
if (data.code === 200) {
localStorage.setItem("token", data.value);
// TODO redirect to other page
window.location.href = "/resource/songs";
}
});
}
......
import React from "react";
export default class HomePage extends React.PureComponent {
export default class SongListPage extends React.PureComponent {
render() {
return (
<div className="page-song-list" />
<div className="page-song-list">
<h1>SONGS</h1>
</div>
);
}
}
......@@ -79,9 +79,7 @@ module.exports = (env, options) => {
devServer: {
contentBase: "./dist",
open: false,
historyApiFallback: {
index: "index.html",
},
historyApiFallback: true,
proxy: {
"/api": "http://localhost:5000",
"/auth": "http://localhost:5000",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment