Skip to content

Commit

Permalink
♻️ Refactor: 프로필 이미지 src에 이전 이미지 변수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-paik committed Nov 19, 2023
1 parent f1c0076 commit 6e493e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Profile/ProfileImage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import AddImg from '../../assets/sprite/img-btn.svg';
import AddDarkImg from '../../assets/sprite/img-btn-dark.svg';
import BasicProfileImg from '../../assets/images/basic-profile-l.svg';

const ProfileImage = ({ previewImage, handleImage }) => {
const ProfileImage = ({ prevImage, previewImage, handleImage }) => {
return (
<>
<Label htmlFor="image" >
<Image src={previewImage ? previewImage : BasicProfileImg} alt="사용자 프로필 이미지" />
<Image src={previewImage || prevImage || BasicProfileImg}
alt="사용자 프로필 이미지" />
</Label>
<ImageInput
type="file"
Expand Down

0 comments on commit 6e493e6

Please sign in to comment.