update
This commit is contained in:
@@ -21,12 +21,13 @@ import {
|
||||
KeyRound
|
||||
} from 'lucide-react';
|
||||
import { toast } from 'react-toastify';
|
||||
import authService from '../../services/api/authService';
|
||||
import authService from '../../features/auth/services/authService';
|
||||
import useAuthStore from '../../store/useAuthStore';
|
||||
import { Loading, EmptyState } from '../../components/common';
|
||||
import { useAsync } from '../../hooks/useAsync';
|
||||
import { useGlobalLoading } from '../../contexts/LoadingContext';
|
||||
import { normalizeImageUrl } from '../../utils/imageUtils';
|
||||
import Loading from '../../shared/components/Loading';
|
||||
import EmptyState from '../../shared/components/EmptyState';
|
||||
import { useAsync } from '../../shared/hooks/useAsync';
|
||||
import { useGlobalLoading } from '../../shared/contexts/LoadingContext';
|
||||
import { normalizeImageUrl } from '../../shared/utils/imageUtils';
|
||||
|
||||
const profileValidationSchema = yup.object().shape({
|
||||
name: yup
|
||||
@@ -200,7 +201,7 @@ const ProfilePage: React.FC = () => {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const { updateUser } = await import('../../services/api/userService');
|
||||
const { updateUser } = await import('../../features/auth/services/userService');
|
||||
const user = userInfo && 'user' in userInfo ? userInfo.user : userInfo;
|
||||
const response = await updateUser((user as any)?.id || (userInfo as any)?.id, {
|
||||
full_name: data.name,
|
||||
@@ -251,7 +252,7 @@ const ProfilePage: React.FC = () => {
|
||||
resetPassword();
|
||||
}
|
||||
} else {
|
||||
const { updateUser } = await import('../../services/api/userService');
|
||||
const { updateUser } = await import('../../features/auth/services/userService');
|
||||
const user = userInfo && 'user' in userInfo ? userInfo.user : userInfo;
|
||||
const response = await updateUser((user as any)?.id || (userInfo as any)?.id, {
|
||||
password: data.newPassword,
|
||||
|
||||
Reference in New Issue
Block a user