From a12f85112f7eec56214890a7beb4d1fea399433e Mon Sep 17 00:00:00 2001 From: Casey O'Keefe Date: Thu, 16 Nov 2017 18:09:35 -0600 Subject: [PATCH] finished everything with all working as intended --- src/App.js | 30 +++++++++++++++++++++++++++++- src/components/Charts.js | 9 +++++++++ src/components/Fables.js | 9 +++++++++ src/components/Marquee.js | 2 +- src/components/Profile.js | 3 ++- src/components/Profiles.js | 3 ++- src/components/Settings.js | 9 +++++++++ src/components/SideNav.js | 30 ++++++++++++++++++++++-------- src/components/Wall.js | 9 +++++++++ 9 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 src/components/Charts.js create mode 100644 src/components/Fables.js create mode 100644 src/components/Settings.js create mode 100644 src/components/Wall.js diff --git a/src/App.js b/src/App.js index 15bddc9..d61c905 100644 --- a/src/App.js +++ b/src/App.js @@ -1,19 +1,47 @@ import React from "react"; import TopNav from "./components/TopNav"; import SideNav from "./components/SideNav"; +import Dashboard from "./components/Dashboard"; +import Charts from "./components/Charts"; +import Fables from "./components/Fables"; +import Settings from "./components/Settings"; +import Wall from "./components/Wall"; +import Profiles from "./components/Profiles"; +import Marquee from "./components/Marquee"; +import Profile from "./components/Profile"; + +import { + BrowserRouter, + Route, + Switch + } from "react-router-dom"; + function App() { return (
+
- {/* PUT YOUR ROUTES HERE */} + + + + + + + + + + + +
+
); diff --git a/src/components/Charts.js b/src/components/Charts.js new file mode 100644 index 0000000..4f192a2 --- /dev/null +++ b/src/components/Charts.js @@ -0,0 +1,9 @@ +import React from "react"; + +function Charts(props) { + return ( +
this is a chart
+ ); +} + +export default Charts; diff --git a/src/components/Fables.js b/src/components/Fables.js new file mode 100644 index 0000000..34a4e32 --- /dev/null +++ b/src/components/Fables.js @@ -0,0 +1,9 @@ +import React from "react"; + +function Fables(props) { + return ( +
this is a tablesssssssssssssss
+ ); +} + +export default Fables; diff --git a/src/components/Marquee.js b/src/components/Marquee.js index 820e8c4..21565c7 100644 --- a/src/components/Marquee.js +++ b/src/components/Marquee.js @@ -1,7 +1,7 @@ import React from "react"; function Marquee(props) { - const message = "hello"; + const message = props.match.params.text; return ( {message} ); diff --git a/src/components/Profile.js b/src/components/Profile.js index c4eb646..86ebcaf 100644 --- a/src/components/Profile.js +++ b/src/components/Profile.js @@ -2,7 +2,8 @@ import React from "react"; import {connect} from "react-redux"; function Profile(props) { - const userId = 0; + + const userId = props.match.params.id; const user = props.users.find(u => u.id == userId) || {}; return (
diff --git a/src/components/Profiles.js b/src/components/Profiles.js index 3409812..982487d 100644 --- a/src/components/Profiles.js +++ b/src/components/Profiles.js @@ -1,12 +1,13 @@ import React from "react"; import {connect} from "react-redux"; +import {Link} from "react-router-dom"; function Profiles(props) { const userDivs = props.users.map((user,i) => { return (
{user.firstName} - {user.lastName} - View + View
); }); return ( diff --git a/src/components/Settings.js b/src/components/Settings.js new file mode 100644 index 0000000..227eb2a --- /dev/null +++ b/src/components/Settings.js @@ -0,0 +1,9 @@ +import React from "react"; + +function Settings(props) { + return ( +
these are settings
+ ); +} + +export default Settings; diff --git a/src/components/SideNav.js b/src/components/SideNav.js index 9caaf7c..b83f59f 100644 --- a/src/components/SideNav.js +++ b/src/components/SideNav.js @@ -1,27 +1,41 @@ import React from "react"; -// import {Link} from "react-router-dom"; +import {Link} from "react-router-dom"; function SideNav() { return (
  • - {/* Dashboard - */}
  • - + Charts - + +
  • +
  • + + Fables + +
  • +
  • + Settings +
  • +
  • + Wall +
  • +
  • + Profiles +
  • +
  • + Marquee
  • - - Tables - + Marquee
  • +
); } diff --git a/src/components/Wall.js b/src/components/Wall.js new file mode 100644 index 0000000..b9efce5 --- /dev/null +++ b/src/components/Wall.js @@ -0,0 +1,9 @@ +import React from "react"; + +function Wall(props) { + return ( +
this is a wallllll
+ ); +} + +export default Wall;