From 58df8e249b2791948b100828f357882f367144e7 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 24 Mar 2020 21:03:09 -0700 Subject: [PATCH] Added react router --- package.json | 2 + src/App.jsx | 11 +++-- src/Routes.jsx | 26 +++++++++++ src/components/about/About.jsx | 9 ++++ src/components/contact/Contact.jsx | 9 ++++ src/components/main/body/Body.jsx | 18 ++++---- src/components/main/footer/Footer.jsx | 65 +++++++++++++++++---------- src/components/main/header/Header.jsx | 26 ++++++----- src/components/main/menu/Menu.jsx | 37 ++++++++++++--- 9 files changed, 147 insertions(+), 56 deletions(-) create mode 100644 src/Routes.jsx create mode 100644 src/components/about/About.jsx create mode 100644 src/components/contact/Contact.jsx diff --git a/package.json b/package.json index c96d996f6..ff47112dd 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,8 @@ "react-leaflet-heatmap-layer": "^2.0.0", "react-leaflet-markercluster": "^2.0.0-rc3", "react-redux": "^7.1.3", + "react-router": "^5.1.2", + "react-router-dom": "^5.1.2", "react-test-renderer": "^16.12.0", "react-tooltip": "^4.0.3", "react-vis": "^1.11.7", diff --git a/src/App.jsx b/src/App.jsx index 17c2e1b38..95699e78a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,9 +1,9 @@ import React, { useEffect } from 'react'; import { connect } from 'react-redux'; +import { BrowserRouter as Router } from 'react-router-dom'; +import Routes from './Routes'; import Header from './components/main/header/Header'; -import Body from './components/main/body/Body'; -import Footer from './components/main/footer/Footer'; import Tooltip from './components/main/tooltip/Tooltip'; import SnapshotService, { SnapshotRenderer } from './components/export/SnapshotService'; import Visualizations from './components/Visualizations'; @@ -16,13 +16,12 @@ const App = () => { }, []); return ( - <> +
- -