Wizard: Fix Registration bug

The second condition in `useRegistrationValidation` needs to be triggered only for `register-now` options, otherwise the Next button stays disabled on fetching and error even for `register-later`.
This commit is contained in:
regexowl 2024-09-16 16:04:53 +02:00 committed by Michal Gold
parent 39d2f91f03
commit 003aa9df48

View file

@ -67,7 +67,11 @@ export function useRegistrationValidation(): StepValidation {
};
}
if (activationKey && (isFetching || isError)) {
if (
registrationType !== 'register-later' &&
activationKey &&
(isFetching || isError)
) {
return {
errors: { activationKey: 'Invalid activation key' },
disabledNext: true,