Fixed issue with sighting list, although I hate my solution.

This commit is contained in:
wildscotsmen 2018-12-11 23:54:52 -05:00
parent e9b5e1f9cd
commit 0e9a85e803
2 changed files with 133 additions and 151 deletions

View File

@ -353,7 +353,7 @@ class ResponsiveDrawer extends React.Component {
<Route path="/" component={Home} exact={true} />
<Route path="/report" component={Report} />
<Route path="/view-map" component={ViewMap} />
<Route path="/sighting-list" component={SightingList} />
<Route path="/sighting-list" component={SightingList} key={this.state.themeName} />
<Route path="/about" component={About} />
<Route path="/contact" component={Contact} />
<Route path="/quiz-easy" component={Quiz} key={"Easy"} />

View File

@ -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 (
<Fragment>