diff --git a/src/js/Playlist/View/Count.js b/src/js/Playlist/View/Count.js index 11bcffa..1aa2eb3 100644 --- a/src/js/Playlist/View/Count.js +++ b/src/js/Playlist/View/Count.js @@ -1,7 +1,9 @@ import React, { Component } from "react"; +import { ThemeProvider, Typography } from "@material-ui/core"; const axios = require('axios'); import showMessage from "../../Toast.js" +import GlobalTheme from "../../Theme"; const LazyPieChart = React.lazy(() => import("../../Maths/PieChart")) @@ -64,9 +66,7 @@ class Count extends Component { } render() { - const loadingMessage = Loading...; return ( - }> Scrobble Count: {this.state.playlist.lastfm_stat_count.toLocaleString()} / {this.state.playlist.lastfm_stat_percent}% @@ -80,6 +80,7 @@ class Count extends Component { Last Updated {this.state.playlist.lastfm_stat_last_refresh.toLocaleString()} + }> Update + - ); } } +function LoadingMessage(props) { + return Loading...; +} + export default Count; \ No newline at end of file diff --git a/src/js/Playlist/View/View.js b/src/js/Playlist/View/View.js index f92c7ab..d816995 100644 --- a/src/js/Playlist/View/View.js +++ b/src/js/Playlist/View/View.js @@ -1,12 +1,8 @@ import React, { Component } from "react"; -import { ThemeProvider, Typography } from "@material-ui/core"; -import { BrowserRouter as Route, Link} from "react-router-dom"; - -import GlobalTheme from "../../Theme"; - -const LazyEdit = React.lazy(() => import("./Edit")) -const LazyCount = React.lazy(() => import("./Count")) +import { BrowserRouter as Router, Route, Link, Switch, Redirect} from "react-router-dom"; +import Edit from "./Edit.js"; +import Count from "./Count.js"; class View extends Component{ @@ -28,18 +24,12 @@ class View extends Component{ - }> - } /> - } /> - + } /> + } /> ); } } -function LoadingMessage(props) { - return Loading...; -} - export default View; \ No newline at end of file