From f4278351a43b07bf3eca13a33516f28be99ac935 Mon Sep 17 00:00:00 2001 From: leejeongho Date: Tue, 27 Aug 2024 10:34:56 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20getWebDomain=EC=9C=BC=EB=A1=9C=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 --- .../components/Button/InviteLinkShareButton.tsx | 4 +++- .../components/Button/ShareKakaoButton.tsx | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/web-domains/src/new-meeting/features/new-meeting-closing/components/Button/InviteLinkShareButton.tsx b/packages/web-domains/src/new-meeting/features/new-meeting-closing/components/Button/InviteLinkShareButton.tsx index dabaa8c2..9e2264a2 100644 --- a/packages/web-domains/src/new-meeting/features/new-meeting-closing/components/Button/InviteLinkShareButton.tsx +++ b/packages/web-domains/src/new-meeting/features/new-meeting-closing/components/Button/InviteLinkShareButton.tsx @@ -2,6 +2,7 @@ import { Txt } from '@sambad/sds/components'; import { size, colors } from '@sambad/sds/theme'; import CopyToClipboard from 'react-copy-to-clipboard'; +import { getWebDomain } from '@/common'; import { CircleCopy } from '@/new-meeting/common/assets/icons/CircleCopy'; import { useToast } from '@/new-meeting/common/components/Toast/ToastProvider'; @@ -13,6 +14,7 @@ interface InviteLinkShareButtonProps { export const InviteLinkShareButton = (props: InviteLinkShareButtonProps) => { const { inviteCode } = props; + const domain = getWebDomain(); if (!inviteCode) { return null; @@ -24,7 +26,7 @@ export const InviteLinkShareButton = (props: InviteLinkShareButtonProps) => { addToast(() => CopyToast({ content: '링크를 복사했어요!' })); }; - const copyUrl = `${window.location.origin}/meeting/participate/closing?inviteCode=${inviteCode}`; + const copyUrl = `${domain}/meeting/participate/closing?inviteCode=${inviteCode}`; return (
diff --git a/packages/web-domains/src/new-meeting/features/new-meeting-closing/components/Button/ShareKakaoButton.tsx b/packages/web-domains/src/new-meeting/features/new-meeting-closing/components/Button/ShareKakaoButton.tsx index 90b932c0..23e53166 100644 --- a/packages/web-domains/src/new-meeting/features/new-meeting-closing/components/Button/ShareKakaoButton.tsx +++ b/packages/web-domains/src/new-meeting/features/new-meeting-closing/components/Button/ShareKakaoButton.tsx @@ -1,7 +1,7 @@ import { Txt } from '@sambad/sds/components'; import { size, colors } from '@sambad/sds/theme'; -import { generateKakaoShare } from '@/common'; +import { generateKakaoShare, getWebDomain } from '@/common'; import { CircleKakao } from '@/new-meeting/common/assets/icons/CircleKakao'; interface shareKakaoButtonProps { @@ -11,6 +11,7 @@ interface shareKakaoButtonProps { const ShareKakaoButton = (props: shareKakaoButtonProps) => { const { inviteCode, name } = props; + const domain = getWebDomain(); if (!inviteCode) { return null; @@ -20,7 +21,7 @@ const ShareKakaoButton = (props: shareKakaoButtonProps) => { generateKakaoShare({ shareDescription: `${name} 모임에 여러분들을 초대합니다`, shareImageUrl: 'https://file.moring.one/defaults/invite_narrow.png', - shareLink: `${window.location.origin}/meeting/participate/closing?inviteCode=${inviteCode}`, + shareLink: `${domain}/meeting/participate/closing?inviteCode=${inviteCode}`, }); };