From aa12026621bbcf70f615b1612c3fd2978181a04f Mon Sep 17 00:00:00 2001 From: Ajin Park <108174693+lalaurrel@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:34:26 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Feat:=20svg=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/default/share.svg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/assets/default/share.svg diff --git a/src/assets/default/share.svg b/src/assets/default/share.svg new file mode 100644 index 00000000..68778689 --- /dev/null +++ b/src/assets/default/share.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + From 202205a031e0a7a6cca615b344a37b6a04fc4334 Mon Sep 17 00:00:00 2001 From: Ajin Park <108174693+lalaurrel@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:34:42 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Feat:=20=EC=B9=9C=EA=B5=AC=EC=97=90?= =?UTF-8?q?=EA=B2=8C=20=EA=B3=B5=EC=9C=A0=ED=95=98=EA=B8=B0=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Home/OOTD/Feed/index.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/pages/Home/OOTD/Feed/index.tsx b/src/pages/Home/OOTD/Feed/index.tsx index 842e6580..663e420a 100644 --- a/src/pages/Home/OOTD/Feed/index.tsx +++ b/src/pages/Home/OOTD/Feed/index.tsx @@ -19,6 +19,7 @@ import { getCurrentUserId } from '@utils/getCurrentUserId'; import defaultProfile from '@assets/default/defaultProfile.svg'; import more from '@assets/default/more.svg'; import xBtn from '@assets/default/reject.svg'; +import share from '@assets/default/share.svg'; import Heart from '@components/Icons/Heart'; import Message from '@components/Icons/Message'; @@ -209,6 +210,24 @@ const Feed: React.FC = ({ feed }) => { }, }; + // 친구한테 프로필 공유하기 + const handleShareButtonClick = (e: React.MouseEvent) => { + e.stopPropagation(); + // 사용자 ID로 프로필 URL 생성 + const profileUrl = `${window.location.origin}/profile/${feed.user.id}`; + + navigator.clipboard + .writeText(profileUrl) + .then(() => { + setModalContent(`${feed.user.nickname}님의 프로필이 복사되었습니다!`); + setIsStatusModalOpen(true); // 복사 성공 후 모달 열기 + }) + .catch(() => { + setModalContent('프로필 복사에 실패했습니다. 다시 시도해 주세요.'); + setIsStatusModalOpen(true); // 복사 실패 시 모달 열기 + }); + }; + return ( @@ -251,7 +270,11 @@ const Feed: React.FC = ({ feed }) => {
+
+ 공유 +
+