Update dependencies
This commit is contained in:
@@ -28,6 +28,7 @@ export default function ADFGVXInputs(){
|
||||
//Do coding with a delay
|
||||
const performCoding = useDebouncedCallback(() => {
|
||||
if((input === "") || (keyword.length < 2)){
|
||||
// eslint-disable-next-line @eslint-react/set-state-in-effect
|
||||
setOutput("");
|
||||
return;
|
||||
}
|
||||
@@ -64,14 +65,16 @@ export default function ADFGVXInputs(){
|
||||
//When the mutation is successful set the new output
|
||||
useEffect(() => {
|
||||
if(decodeADFGVXMutation.isSuccess){
|
||||
// eslint-disable-next-line @eslint-react/set-state-in-effect,react-hooks/set-state-in-effect
|
||||
setOutput(decodeADFGVXMutation.data.outputString ?? "");
|
||||
decodeADFGVXMutation.reset();
|
||||
}
|
||||
if(encodeADFGVXMutation.isSuccess){
|
||||
// eslint-disable-next-line @eslint-react/set-state-in-effect
|
||||
setOutput(encodeADFGVXMutation.data.outputString ?? "");
|
||||
encodeADFGVXMutation.reset();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
// eslint-disable-next-line @eslint-react/exhaustive-deps,react-hooks/exhaustive-deps
|
||||
}, [ decodeADFGVXMutation.isSuccess, encodeADFGVXMutation.isSuccess, decodeADFGVXMutation.data, encodeADFGVXMutation.data ]);
|
||||
|
||||
//When the mutation has an error, display the message
|
||||
@@ -84,7 +87,7 @@ export default function ADFGVXInputs(){
|
||||
addDanger(encodeADFGVXMutation.error.message);
|
||||
encodeADFGVXMutation.reset();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
// eslint-disable-next-line @eslint-react/exhaustive-deps,react-hooks/exhaustive-deps
|
||||
}, [ decodeADFGVXMutation.isError, encodeADFGVXMutation.isError ]);
|
||||
|
||||
|
||||
@@ -122,7 +125,7 @@ export default function ADFGVXInputs(){
|
||||
<TextInput
|
||||
placeholder="Square Keyword"
|
||||
value={squareKeyword}
|
||||
onChange={(e) => setSquareKeyword(e.target.value)}
|
||||
onChange={setSquareKeyword}
|
||||
labelClassName="bg-(--bg-color) text-(--text-color)"
|
||||
/>
|
||||
<InputMessage
|
||||
|
||||
Reference in New Issue
Block a user