mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
lint
This commit is contained in:
parent
eb103c8e9f
commit
0fc6e8dcd7
@ -39,15 +39,18 @@ const WithConfig: ReactComponent = ({ children }) => {
|
||||
|
||||
React.useEffect(() => {
|
||||
const jsonStored = localStorage.getItem("json");
|
||||
if (jsonStored)
|
||||
if (jsonStored) {
|
||||
dispatch({ type: ConfigActionType.SET_JSON, payload: jsonStored });
|
||||
}
|
||||
|
||||
const configStored = localStorage.getItem("config");
|
||||
if (configStored)
|
||||
if (configStored) {
|
||||
dispatch({
|
||||
type: ConfigActionType.SET_CONFIG,
|
||||
payload: JSON.parse(configStored),
|
||||
});
|
||||
}
|
||||
|
||||
setRender(true);
|
||||
}, [dispatch]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user