diff --git a/client/app/app.tsx b/client/app/app.tsx index 24c74a6..d044ac4 100644 --- a/client/app/app.tsx +++ b/client/app/app.tsx @@ -9,6 +9,7 @@ import { NotFound } from './pages/NotFound/NotFound'; import { Downloader } from './pages/Downloader/Downloader'; import { Clips } from './pages/Clips'; import { Oauth } from './pages/oauth/oauth'; +import { Stats } from './pages/stats/stats'; import 'babel-polyfill'; const App: any = (): any => { @@ -21,6 +22,7 @@ const App: any = (): any => { + diff --git a/client/app/components/Navbar/Navbar.tsx b/client/app/components/Navbar/Navbar.tsx index ab629fd..0aa6d70 100644 --- a/client/app/components/Navbar/Navbar.tsx +++ b/client/app/components/Navbar/Navbar.tsx @@ -1,9 +1,8 @@ import React from 'react'; import { NavLink } from 'react-router-dom'; import jwt_decode from 'jwt-decode'; - +import { StorageService } from '../../services'; import './Navbar.scss'; -import { storage } from '../../storage'; let oauthUrl: string; @@ -31,25 +30,24 @@ export class Navbar extends React.Component { } componentDidMount() { - const token = storage.getJWT(); + const token = StorageService.getJWT(); if (token) { const claims: any = jwt_decode(token!); - console.log(claims); const email = claims['email']; this.setState({ token, email }); } } private logout = () => { - localStorage.clear(); + StorageService.clear(); window.location.href = '/'; }; render() { return (
-
Go Discord Bot
+
Cash
Home @@ -62,6 +60,9 @@ export class Navbar extends React.Component { Clips + + Stats + {!this.state.token ? ( diff --git a/client/app/components/SoundList/SoundList.tsx b/client/app/components/SoundList/SoundList.tsx index 37ce7db..ea9a922 100644 --- a/client/app/components/SoundList/SoundList.tsx +++ b/client/app/components/SoundList/SoundList.tsx @@ -51,8 +51,8 @@ export class SoundList extends React.Component { const { soundList, type } = this.props; return ( -
-
+
+
{type}