patch App and ActionError components to cleanup effect

This commit is contained in:
Sorrel Bri 2020-05-14 21:01:04 -07:00
parent ef0e53756e
commit 572a1dcf19
2 changed files with 3 additions and 1 deletions

View file

@ -36,6 +36,8 @@ function App() {
dispatch({type:'SOCKET', message: 'LAUNCH', body:{nsp:'', dispatch}});
}
socketConnect();
return () => dispatch({type: 'SOCKET', message: 'DISCONNECT', body: {}});
}, [ state.connect ])
return (

View file

@ -2,7 +2,7 @@ import React from 'react';
import './ActionError.scss';
const ActionError = (props) => {
const errorMessage = props.error;
const errorMessage = props.error || '';
return (
<span
className="error error--action"