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