fix: login result handle changed to a singular function

This commit is contained in:
2025-08-21 14:36:07 +03:30
parent 4d84a29bda
commit 74fa41c1c0
6 changed files with 33 additions and 30 deletions

View File

@@ -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',