From 0d3167c1a2dbef22372acf0b0e957c9ce9a08a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=84=B1=EA=B2=BD?= Date: Thu, 20 Aug 2026 16:35:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B3=B5=EC=9C=A0=ED=95=98=EA=B8=B0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ContentCardSocialActions.tsx | 7 +++--- src/components/VideoDetailContent.tsx | 24 +++++++++++---------- src/pages/Dashboard/ADO2ContentsPage.tsx | 1 + src/pages/Dashboard/MyContentsPage.tsx | 1 + src/types/api.ts | 2 ++ src/utils/nativeShare.ts | 3 +++ 6 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/components/ContentCardSocialActions.tsx b/src/components/ContentCardSocialActions.tsx index 52d16bb..897c2e5 100644 --- a/src/components/ContentCardSocialActions.tsx +++ b/src/components/ContentCardSocialActions.tsx @@ -7,6 +7,7 @@ interface ContentCardSocialActionsProps { videoId: number; storeName: string; region?: string; + title?: string | null; commentCount: number; initialLikeCount: number; initialIsLiked?: boolean; @@ -15,7 +16,7 @@ interface ContentCardSocialActionsProps { const ContentCardSocialActions: React.FC = ({ videoId, storeName, - region, + title, commentCount, initialLikeCount, initialIsLiked = false, @@ -27,15 +28,13 @@ const ContentCardSocialActions: React.FC = ({ const likeDebounceRef = useRef | null>(null); const shareUrl = buildVideoShareUrl(API_URL, videoId); - const shareTitle = storeName || t('videoDetail.kakaoDefaultTitle'); - const shareDescription = t('videoDetail.kakaoDescription', { region: region ?? '' }); + const shareTitle = title || storeName || t('videoDetail.kakaoDefaultTitle'); const handleShareBtnClick = async (e: React.MouseEvent) => { e.stopPropagation(); const handled = await tryNativeShare({ title: shareTitle, - text: shareDescription, url: shareUrl, }); if (handled) { diff --git a/src/components/VideoDetailContent.tsx b/src/components/VideoDetailContent.tsx index f7c27f2..5085b2e 100644 --- a/src/components/VideoDetailContent.tsx +++ b/src/components/VideoDetailContent.tsx @@ -103,26 +103,27 @@ const VideoDetailContent: React.FC = ({ videoId, isModa }; const shareUrl = buildVideoShareUrl(API_URL, videoId); - const shareTitle = video?.store_name ?? t('videoDetail.kakaoDefaultTitle'); - const shareDescription = t('videoDetail.kakaoDescription', { region: video?.region ?? '' }); + const shareTitle = video?.title || video?.store_name || t('videoDetail.kakaoDefaultTitle'); + + const handleCopyLink = async () => { + try { + await navigator.clipboard.writeText(shareUrl); + } catch { + // clipboard API 미지원 환경에서는 무시 + } + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }; const handleShareButtonClick = async () => { const handled = await tryNativeShare({ title: shareTitle, - text: shareDescription, url: shareUrl, }); if (handled) { return; } - - try { - await navigator.clipboard.writeText(shareUrl); - setCopied(true); - setTimeout(() => setCopied(false), 2000); - } catch { - // clipboard API 미지원 환경에서는 무시 - } + await handleCopyLink(); }; const likeDebounceRef = React.useRef | null>(null); @@ -252,6 +253,7 @@ const VideoDetailContent: React.FC = ({ videoId, isModa