fix: login result handle changed to a singular function
This commit is contained in:
@@ -18,7 +18,7 @@ import {
|
||||
sendEmailOtp,
|
||||
sendSmsOtp,
|
||||
} from '../../api/authorizationAPI';
|
||||
import type { PasswordLoginRequest } from '../../types/userTypes';
|
||||
import type { LoginResult, PasswordLoginRequest } from '../../types/userTypes';
|
||||
import { Icon, useToast } from '@rkheftan/harmony-ui';
|
||||
import { useApi } from '@/hooks/useApi';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
@@ -27,7 +27,7 @@ import { generateTokenWithPassword } from '../../api/identityAPI';
|
||||
export interface EnterPasswordFormProps {
|
||||
onEditValue: () => void;
|
||||
onLoginWithOTP: () => void;
|
||||
onLoggedIn: (userId: GUID) => void;
|
||||
onLoggedIn: (loginResult: LoginResult) => void;
|
||||
emailOrPhone: string;
|
||||
authType: AuthType;
|
||||
loginRegisterValue: string;
|
||||
@@ -87,7 +87,7 @@ export const EnterPasswordForm = ({
|
||||
...tokenRes.data,
|
||||
});
|
||||
|
||||
onLoggedIn(res.userId);
|
||||
onLoggedIn(res);
|
||||
toast({
|
||||
message: t('verify.youHaveSuccessfullyLoggedIn'),
|
||||
severity: 'success',
|
||||
|
||||
Reference in New Issue
Block a user