Skip to content
Snippets Groups Projects
Commit b5b79e49 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[dome] restore default settings

parent 7c588d34
No related branches found
No related tags found
No related merge requests found
...@@ -227,13 +227,10 @@ function useSettings<A>( ...@@ -227,13 +227,10 @@ function useSettings<A>(
const [value, setValue] = React.useState<A>(loader); const [value, setValue] = React.useState<A>(loader);
// Broadcast // Broadcast
React.useEffect(() => { React.useEffect(() => {
if (K) { const event = D.evt;
const event = D.evt; const callback = () => setValue(loader());
const callback = () => setValue(loader()); SysEmitter.on(event, callback);
SysEmitter.on(event, callback); return () => { SysEmitter.off(event, callback); };
return () => { SysEmitter.off(event, callback); };
}
return undefined;
}); });
// Updates // Updates
const updateValue = React.useCallback((newValue: A) => { const updateValue = React.useCallback((newValue: A) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment