mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-05-06 05:55:53 +00:00
Remove useMemo/useCallback across the web UI
This commit is contained in:
@@ -43,7 +43,6 @@ const SignIn = memo(() => {
|
||||
}
|
||||
});
|
||||
|
||||
// Memoize callback to prevent recreation on every render
|
||||
const updateLoginRequestValue = useMemo(
|
||||
() =>
|
||||
updateValue((updater) =>
|
||||
@@ -65,7 +64,7 @@ const SignIn = memo(() => {
|
||||
});
|
||||
}, [callSignIn, signInRequest, LL]);
|
||||
|
||||
const validateAndSignIn = useCallback(async () => {
|
||||
const validateAndSignIn = async () => {
|
||||
setProcessing(true);
|
||||
SIGN_IN_REQUEST_VALIDATOR.messages({
|
||||
required: LL.IS_REQUIRED('%s')
|
||||
@@ -77,7 +76,7 @@ const SignIn = memo(() => {
|
||||
setFieldErrors((error as ValidationError).fieldErrors);
|
||||
setProcessing(false);
|
||||
}
|
||||
}, [signInRequest, signIn, LL]);
|
||||
};
|
||||
|
||||
const submitOnEnter = useMemo(() => onEnterCallback(signIn), [signIn]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user