mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(ui): should handle requiredProfile error on bindSocialRelatedUser (#3034)
This commit is contained in:
parent
f298e1c296
commit
61a89f829e
1 changed files with 7 additions and 1 deletions
|
@ -3,8 +3,14 @@ import { useEffect } from 'react';
|
|||
import { bindSocialRelatedUser } from '@/apis/interaction';
|
||||
import useApi from '@/hooks/use-api';
|
||||
|
||||
import useRequiredProfileErrorHandler from './use-required-profile-error-handler';
|
||||
|
||||
const useBindSocialRelatedUser = () => {
|
||||
const { result: bindUserResult, run: asyncBindSocialRelatedUser } = useApi(bindSocialRelatedUser);
|
||||
const requiredProfileErrorHandlers = useRequiredProfileErrorHandler();
|
||||
const { result: bindUserResult, run: asyncBindSocialRelatedUser } = useApi(
|
||||
bindSocialRelatedUser,
|
||||
requiredProfileErrorHandlers
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (bindUserResult?.redirectTo) {
|
||||
|
|
Loading…
Reference in a new issue