constructor(props) {
super(props)
this.state = {
query: '',
toggle: 'off'
}
}
componentWillReceiveProps(nextProps) {
if (!nextProps.location.pathname.includes('/search')) {
this.setState({
query: '',
toggle: 'off'
})
}
}