|
@@ -39,15 +39,18 @@ const WithConfig: ReactComponent = ({ children }) => {
|
|
|
|
|
|
React.useEffect(() => {
|
|
React.useEffect(() => {
|
|
const jsonStored = localStorage.getItem("json");
|
|
const jsonStored = localStorage.getItem("json");
|
|
- if (jsonStored)
|
|
|
|
|
|
+ if (jsonStored) {
|
|
dispatch({ type: ConfigActionType.SET_JSON, payload: jsonStored });
|
|
dispatch({ type: ConfigActionType.SET_JSON, payload: jsonStored });
|
|
|
|
+ }
|
|
|
|
|
|
const configStored = localStorage.getItem("config");
|
|
const configStored = localStorage.getItem("config");
|
|
- if (configStored)
|
|
|
|
|
|
+ if (configStored) {
|
|
dispatch({
|
|
dispatch({
|
|
type: ConfigActionType.SET_CONFIG,
|
|
type: ConfigActionType.SET_CONFIG,
|
|
payload: JSON.parse(configStored),
|
|
payload: JSON.parse(configStored),
|
|
});
|
|
});
|
|
|
|
+ }
|
|
|
|
+
|
|
setRender(true);
|
|
setRender(true);
|
|
}, [dispatch]);
|
|
}, [dispatch]);
|
|
|
|
|