From ae4a84be9f4219d9036dc7ac83745024106279f4 Mon Sep 17 00:00:00 2001 From: Jio Date: Mon, 27 Jul 2026 10:34:18 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20=EA=B8=B0=EB=B3=B8=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=95=84=20=EC=95=84=EB=B0=94=ED=83=80=20=EC=95=84?= =?UTF-8?q?=EC=9D=B4=EC=BD=98=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20ProfileAv?= =?UTF-8?q?atar=EC=97=90=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 온보딩에서 프로필 미설정(건너뛰기) 시 마이페이지 기본 프로필 사진으로 표시되도록 AvatarIcon 컴포넌트 추가. ProfileAvatar의 중복 인라인 SVG를 새 컴포넌트로 교체. --- components/icons/avatar-icon.tsx | 32 +++++++++++++++++++ features/mypage/components/profile-avatar.tsx | 23 +++---------- 2 files changed, 37 insertions(+), 18 deletions(-) create mode 100644 components/icons/avatar-icon.tsx diff --git a/components/icons/avatar-icon.tsx b/components/icons/avatar-icon.tsx new file mode 100644 index 00000000..69e76e2a --- /dev/null +++ b/components/icons/avatar-icon.tsx @@ -0,0 +1,32 @@ +import { Circle, Path, Svg } from "react-native-svg"; + +type Props = { + size?: number; + /** 배경 원 색상 */ + backgroundColor?: string; + /** 사람 실루엣 색상 */ + color?: string; +}; + +export function AvatarIcon({ + size = 60, + backgroundColor = "#E5E7EB", + color = "#A4ABC0", +}: Props) { + return ( + + + + + ); +} diff --git a/features/mypage/components/profile-avatar.tsx b/features/mypage/components/profile-avatar.tsx index e643ba19..4c8734cb 100644 --- a/features/mypage/components/profile-avatar.tsx +++ b/features/mypage/components/profile-avatar.tsx @@ -1,5 +1,5 @@ -import { Image, View } from 'react-native'; -import { Circle, Path, Svg } from 'react-native-svg'; +import { AvatarIcon } from "@/components/icons/avatar-icon"; +import { Image } from "react-native"; type Props = { url?: string | null; @@ -7,7 +7,7 @@ type Props = { }; export function ProfileAvatar({ url, size = 100 }: Props) { - if (url?.startsWith('http')) { + if (url?.startsWith("http")) { return ( - {/* 원형 배경 */} - - - - {/* 사람 아이콘 */} - - - - - ); + // 프로필 이미지 미설정(온보딩 건너뛰기 포함) 시 기본 아바타 표시 + return ; }