Skip to content

Commit

Permalink
Style: 프로필 페이지 사용하지 않는 import문 제거 및 useEffect 의존성 배열 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkSohyunee committed Dec 17, 2024
1 parent 95ba9ff commit 85c9b75
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/account/profile/_components/ProfileForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default function ProfileForm({
useEffect(() => {
setSelectedBackground(getValues('backgroundImageUrl') as string);
setSelectedProfile(getValues('profileImageUrl') as string);
}, []);
}, [getValues]);

return (
<>
Expand Down
2 changes: 0 additions & 2 deletions src/app/account/profile/_components/ProfileSkeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Skeleton from '@/components/Skeleton/Skeleton';
import * as pageStyles from '../page.css';
import * as previewStyles from './ImagePreview.css';
import * as styles from './ProfileForm.css';

const NUMBER_OF_BACKGROUND_OPTIONS = 8;
Expand Down
3 changes: 2 additions & 1 deletion src/app/account/profile/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use client';

import { useEffect, useState } from 'react';
import { FormProvider, useForm } from 'react-hook-form';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
Expand Down Expand Up @@ -54,7 +55,7 @@ export default function ProfilePage() {
});
setProfilePreviewUrl(userData?.profileImageUrl ?? '');
setBackgroundPreviewUrl(userData?.backgroundImageUrl ?? '');
}, [userData]);
}, [userData, methods]);

//미리보기 이미지 변경
const handleProfilePreviewChange = async (image: File | string) => {
Expand Down

0 comments on commit 85c9b75

Please sign in to comment.