mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
fix(ui): add mandatory profile missing error handle logic (#2557)
This commit is contained in:
parent
549cb66a92
commit
19fb2827c7
4 changed files with 12 additions and 12 deletions
|
@ -23,7 +23,9 @@ const useRegisterWithEmailPasscodeValidation = (email: string, errorCallback?: (
|
|||
|
||||
const { signInMode } = useSieMethods();
|
||||
|
||||
const { run: signInWithEmailAsync } = useApi(signInWithEmail);
|
||||
const requiredProfileErrorHandlers = useRequiredProfileErrorHandler(true);
|
||||
|
||||
const { run: signInWithEmailAsync } = useApi(signInWithEmail, requiredProfileErrorHandlers);
|
||||
|
||||
const identifierExistErrorHandler = useIdentifierErrorAlert(
|
||||
UserFlow.register,
|
||||
|
@ -31,8 +33,6 @@ const useRegisterWithEmailPasscodeValidation = (email: string, errorCallback?: (
|
|||
email
|
||||
);
|
||||
|
||||
const requiredProfileErrorHandlers = useRequiredProfileErrorHandler(true);
|
||||
|
||||
const emailExistSignInErrorHandler = useCallback(async () => {
|
||||
const [confirm] = await show({
|
||||
confirmText: 'action.sign_in',
|
||||
|
|
|
@ -23,7 +23,9 @@ const useRegisterWithSmsPasscodeValidation = (phone: string, errorCallback?: ()
|
|||
const { errorMessage, clearErrorMessage, sharedErrorHandlers } = useSharedErrorHandler();
|
||||
const { signInMode } = useSieMethods();
|
||||
|
||||
const { run: signInWithSmsAsync } = useApi(signInWithSms);
|
||||
const requiredProfileErrorHandlers = useRequiredProfileErrorHandler(true);
|
||||
|
||||
const { run: signInWithSmsAsync } = useApi(signInWithSms, requiredProfileErrorHandlers);
|
||||
|
||||
const identifierExistErrorHandler = useIdentifierErrorAlert(
|
||||
UserFlow.register,
|
||||
|
@ -31,8 +33,6 @@ const useRegisterWithSmsPasscodeValidation = (phone: string, errorCallback?: ()
|
|||
formatPhoneNumberWithCountryCallingCode(phone)
|
||||
);
|
||||
|
||||
const requiredProfileErrorHandlers = useRequiredProfileErrorHandler(true);
|
||||
|
||||
const phoneExistSignInErrorHandler = useCallback(async () => {
|
||||
const [confirm] = await show({
|
||||
confirmText: 'action.sign_in',
|
||||
|
|
|
@ -24,7 +24,9 @@ const useSignInWithEmailPasscodeValidation = (email: string, errorCallback?: ()
|
|||
|
||||
const { signInMode } = useSieMethods();
|
||||
|
||||
const { run: registerWithEmailAsync } = useApi(registerWithEmail);
|
||||
const requiredProfileErrorHandlers = useRequiredProfileErrorHandler(true);
|
||||
|
||||
const { run: registerWithEmailAsync } = useApi(registerWithEmail, requiredProfileErrorHandlers);
|
||||
|
||||
const socialToBind = getSearchParameters(location.search, SearchParameters.bindWithSocial);
|
||||
|
||||
|
@ -34,8 +36,6 @@ const useSignInWithEmailPasscodeValidation = (email: string, errorCallback?: ()
|
|||
email
|
||||
);
|
||||
|
||||
const requiredProfileErrorHandlers = useRequiredProfileErrorHandler(true);
|
||||
|
||||
const emailNotExistRegisterErrorHandler = useCallback(async () => {
|
||||
const [confirm] = await show({
|
||||
confirmText: 'action.create',
|
||||
|
|
|
@ -24,7 +24,9 @@ const useSignInWithSmsPasscodeValidation = (phone: string, errorCallback?: () =>
|
|||
|
||||
const { signInMode } = useSieMethods();
|
||||
|
||||
const { run: registerWithSmsAsync } = useApi(registerWithSms);
|
||||
const requiredProfileErrorHandlers = useRequiredProfileErrorHandler(true);
|
||||
|
||||
const { run: registerWithSmsAsync } = useApi(registerWithSms, requiredProfileErrorHandlers);
|
||||
|
||||
const socialToBind = getSearchParameters(location.search, SearchParameters.bindWithSocial);
|
||||
|
||||
|
@ -34,8 +36,6 @@ const useSignInWithSmsPasscodeValidation = (phone: string, errorCallback?: () =>
|
|||
phone
|
||||
);
|
||||
|
||||
const requiredProfileErrorHandlers = useRequiredProfileErrorHandler(true);
|
||||
|
||||
const phoneNotExistRegisterErrorHandler = useCallback(async () => {
|
||||
const [confirm] = await show({
|
||||
confirmText: 'action.create',
|
||||
|
|
Loading…
Add table
Reference in a new issue