testing: remove error simulation
This commit is contained in:
parent
5c769c261b
commit
cf3a7c97b2
11
src/App.js
11
src/App.js
@ -4,20 +4,11 @@ import Layout from './hoc/Layout/Layout';
|
|||||||
import BurgerBuilder from './containers/BurgerBuilder/BurgerBuilder';
|
import BurgerBuilder from './containers/BurgerBuilder/BurgerBuilder';
|
||||||
|
|
||||||
class App extends Component {
|
class App extends Component {
|
||||||
state = {
|
|
||||||
show: true
|
|
||||||
};
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.setState({show: false});
|
|
||||||
}, 3000);
|
|
||||||
}
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Layout>
|
<Layout>
|
||||||
{this.state.show ? <BurgerBuilder /> : null }
|
<BurgerBuilder />
|
||||||
</Layout>
|
</Layout>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -21,7 +21,6 @@ const withErrorHandler = (WrappedComponent, axios) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
console.log('Will Unmount', this.reqInterceptor, this.resInterceptor);
|
|
||||||
axios.interceptors.request.eject(this.reqInterceptor);
|
axios.interceptors.request.eject(this.reqInterceptor);
|
||||||
axios.interceptors.response.eject(this.resInterceptor);
|
axios.interceptors.response.eject(this.resInterceptor);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user