diff --git a/src/components/navbar.js b/src/components/navbar.js index b7056dc..d54b355 100644 --- a/src/components/navbar.js +++ b/src/components/navbar.js @@ -1,12 +1,10 @@ import React from 'react' -import {connect} from 'react-redux' +import { connect } from 'react-redux' import { Navbar, Nav, NavDropdown, FormControl, Form, Button } from 'react-bootstrap' -import {LinkContainer} from 'react-router-bootstrap' -import {NavLink} from 'react-router-dom' +import { NavLink } from 'react-router-dom' const MainNav = (props) => { - const {episodes, captions} = props - + const { episodes } = props return ( Anarchy Planet @@ -20,7 +18,7 @@ const MainNav = (props) => { )} - Player + Player
diff --git a/src/history.js b/src/history.js index 1a47cc8..301b824 100644 --- a/src/history.js +++ b/src/history.js @@ -2,6 +2,8 @@ const createHistory = require('history').createBrowserHistory const createMemoryHistory = require('history').createMemoryHistory const history = - process.env.NODE_ENV === 'test' ? createMemoryHistory() : createHistory() + process.env.NODE_ENV === 'test' + ? createMemoryHistory() + : createHistory() export default history diff --git a/src/index.js b/src/index.js index 29dce88..1dd7a85 100644 --- a/src/index.js +++ b/src/index.js @@ -1,15 +1,14 @@ import React from 'react' import ReactDOM from 'react-dom' -import {Provider} from 'react-redux' -import {Router} from 'react-router-dom' +import { Provider } from 'react-redux' +import { BrowserRouter as Router } from 'react-router-dom' import history from './history' import store from './store' import App from './app' - ReactDOM.render( - + , diff --git a/src/routes.js b/src/routes.js index 4d0b16b..42aff1e 100644 --- a/src/routes.js +++ b/src/routes.js @@ -1,29 +1,31 @@ -import React, {Component} from 'react' -import {withRouter, Route} from 'react-router-dom' -import {connect} from 'react-redux' -import {Episodes} from './components/episodes' -import {Captions} from './components/captions' +import React, { Component } from 'react' +import { withRouter, Route } from 'react-router-dom' +import { connect } from 'react-redux' +import { Episodes } from './components/episodes' +import { Captions } from './components/captions' import Audio from './components/waveform' -import Main from './components' -class Routes extends Component { - componentDidMount() { - } - render() { - return ( -
- - - - -
- ) - } +import { Main, Navbar } from './components' +import { Login, Signup } from './components/auth-form' + +const Routes = () => { + return ( +
+ + + + + + + +
+ ) + } const mapState = state => { return { episodes: state.episodes, - captions: state.captions + captions: state.captions, } } diff --git a/webpack.config.js b/webpack.config.js index 0ec3052..ccaadd0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,6 +3,10 @@ const path = require('path') module.exports = { entry: ['@babel/polyfill', './src/index.js'], + output: { + path: path.resolve(__dirname, '/dist'), + filename: 'bundle.js', + }, module: { rules: [ { @@ -15,10 +19,6 @@ module.exports = { resolve: { extensions: ['*', '.js', '.jsx'], }, - output: { - path: __dirname + '/dist', - filename: 'bundle.js', - }, plugins: [new webpack.HotModuleReplacementPlugin()], devServer: { contentBase: path.join(__dirname, 'dist'),