From 0e9a85e8038ce10d851729725fa73d1b6ff1fa88 Mon Sep 17 00:00:00 2001 From: wildscotsmen Date: Tue, 11 Dec 2018 23:54:52 -0500 Subject: [PATCH] Fixed issue with sighting list, although I hate my solution. --- src/components/Main.js | 266 +++++++++++++-------------- src/components/list/ViewSightings.js | 18 -- 2 files changed, 133 insertions(+), 151 deletions(-) diff --git a/src/components/Main.js b/src/components/Main.js index 6193cd0..5cce9a7 100644 --- a/src/components/Main.js +++ b/src/components/Main.js @@ -37,10 +37,10 @@ import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles'; import ThemeSwitch from '@material-ui/core/Switch'; import { withCookies, Cookies } from 'react-cookie'; import { - BrowserRouter as Router, - Route, - Link, - Switch + BrowserRouter as Router, + Route, + Link, + Switch } from 'react-router-dom'; const drawerWidth = 240; @@ -194,28 +194,28 @@ class ResponsiveDrawer extends React.Component { - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -224,36 +224,36 @@ class ResponsiveDrawer extends React.Component { {this.state.open ? : } - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -262,27 +262,27 @@ class ResponsiveDrawer extends React.Component { {this.state.open2 ? : } - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -292,82 +292,82 @@ class ResponsiveDrawer extends React.Component { ); return ( - - -
- - - - - - - - Marten Tracker + + +
+ + + + + + + + Marten Tracker - - - - -
-
- - - - - - - - - - - - - - - -
-
-
-
+ +
+
+ +
+
+ + + + + + + + + + + + + + + +
+
+
+
); } } diff --git a/src/components/list/ViewSightings.js b/src/components/list/ViewSightings.js index e97bb16..0d19118 100644 --- a/src/components/list/ViewSightings.js +++ b/src/components/list/ViewSightings.js @@ -64,24 +64,6 @@ class ViewSightings extends Component { clicked: false }; - componentDidUpdate(props) { - if (this.props.themeName !== props.themeName) { - this.setState({ - selectedSighting: { - id: null, - lat: null, - lng: null, - desc: null, - type: null, - confidence: null, - date: null, - time: null - }, - clicked: false - }); - } - } - render() { return (