Browse Source

Renaming state ref

pull/619/head
philon- 1 year ago
parent
commit
672cf8a121
  1. 6
      src/components/PageComponents/Config/Security/Security.tsx

6
src/components/PageComponents/Config/Security/Security.tsx

@ -41,9 +41,9 @@ export const Security = () => {
privateKeyDialogOpen: false, privateKeyDialogOpen: false,
}); });
const stateRef = useRef(state); const adminKeysRef = useRef(state);
useEffect(() => { useEffect(() => {
stateRef.current = state; adminKeysRef.current = state;
}, [state]); }, [state]);
const validateKey = ( const validateKey = (
@ -97,7 +97,7 @@ export const Security = () => {
return; return;
} }
const current = stateRef.current; const current = adminKeysRef.current;
setWorkingConfig( setWorkingConfig(
create(Protobuf.Config.ConfigSchema, { create(Protobuf.Config.ConfigSchema, {

Loading…
Cancel
Save