diff --git a/mpwo_client/src/components/App.jsx b/mpwo_client/src/components/App.jsx index 4b9ff909..0d522f45 100644 --- a/mpwo_client/src/components/App.jsx +++ b/mpwo_client/src/components/App.jsx @@ -2,6 +2,7 @@ import React from 'react' import { Route, Switch } from 'react-router-dom' import './App.css' +import Dashboard from './Dashboard' import Logout from './Logout' import NavBar from './NavBar' import UserForm from './User/UserForm' @@ -16,38 +17,27 @@ export default class App extends React.Component { return (
-
-
-
-
- - ( - - )} - /> - ( - - )} - /> - ( - - )} - /> - -
-
-
-
+ + + ( + + )} + /> + ( + + )} + /> + + + ) } } diff --git a/mpwo_client/src/components/Dashboard/index.jsx b/mpwo_client/src/components/Dashboard/index.jsx new file mode 100644 index 00000000..c707883d --- /dev/null +++ b/mpwo_client/src/components/Dashboard/index.jsx @@ -0,0 +1,19 @@ +import React from 'react' +import { connect } from 'react-redux' + +class Logout extends React.Component { + componentDidMount() {} + render() { + return ( +
+

Dashboard

+
+ ) + } +} + +export default connect( + state => ({ + user: state.user, + }) +)(Logout) diff --git a/mpwo_client/src/components/Logout.jsx b/mpwo_client/src/components/Logout/index.jsx similarity index 93% rename from mpwo_client/src/components/Logout.jsx rename to mpwo_client/src/components/Logout/index.jsx index 070af4ac..1e3ea7e7 100644 --- a/mpwo_client/src/components/Logout.jsx +++ b/mpwo_client/src/components/Logout/index.jsx @@ -2,7 +2,7 @@ import React from 'react' import { connect } from 'react-redux' import { Link } from 'react-router-dom' -import { logout } from '../actions' +import { logout } from '../../actions' class Logout extends React.Component { componentDidMount() { diff --git a/mpwo_client/src/components/NavBar.jsx b/mpwo_client/src/components/NavBar/index.jsx similarity index 98% rename from mpwo_client/src/components/NavBar.jsx rename to mpwo_client/src/components/NavBar/index.jsx index 21a43904..b4cdc389 100644 --- a/mpwo_client/src/components/NavBar.jsx +++ b/mpwo_client/src/components/NavBar/index.jsx @@ -28,7 +28,7 @@ function NavBar (props) { pathname: '/', }} > - Home + Dashboard {!props.user.isAuthenticated && (