From 63bbcc9d534cb985b2b535909c2ecca644a59533 Mon Sep 17 00:00:00 2001 From: myeongheonhong Date: Mon, 5 Feb 2024 17:06:23 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[=20feat=20]=20=EC=BC=80=EC=9D=B4=ED=81=AC?= =?UTF-8?q?=20=EB=B3=84=20GA=ED=83=9C=EA=B7=B8=20=EC=82=BD=EC=9E=85=20/=20?= =?UTF-8?q?=EB=B3=B4=EB=82=B8=20=EC=BC=80=EC=9D=B4=ED=81=AC=20=EC=B8=A1?= =?UTF-8?q?=EC=A0=95=20GA=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Cakes/CakesPay.tsx | 1 + components/Cakes/SelectCakes.tsx | 1 + components/Common/Button/index.tsx | 4 +++- components/Common/Modal/ModalForm/ConfirmCancleModal.tsx | 4 +++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/Cakes/CakesPay.tsx b/components/Cakes/CakesPay.tsx index 681e3eeb..6a122f9a 100644 --- a/components/Cakes/CakesPay.tsx +++ b/components/Cakes/CakesPay.tsx @@ -101,6 +101,7 @@ export default function CakesPay(props: CakesPayProps) { handleConfirmFn={handleNextStep} leftText="송금 안했어요" rightText="송금했어요" + gaTagId={`${selectedCake.name} 보내기`} > {'케이크'} diff --git a/components/Cakes/SelectCakes.tsx b/components/Cakes/SelectCakes.tsx index 67f05f99..690ce2b0 100644 --- a/components/Cakes/SelectCakes.tsx +++ b/components/Cakes/SelectCakes.tsx @@ -27,6 +27,7 @@ export default function SelectCakes(props: SelectCakesProps) { index={index} selectedIndex={selectedIndex} key={cake.name} + id={cake.name} > {`${cake.name}이미지`} diff --git a/components/Common/Button/index.tsx b/components/Common/Button/index.tsx index 7b467b26..335eb508 100644 --- a/components/Common/Button/index.tsx +++ b/components/Common/Button/index.tsx @@ -9,11 +9,12 @@ interface ButtonProps { boxType?: BoxTypes; colorSystem: ColorSystemType; handleClickFn?: (parameter?: unknown) => void | unknown; + gaTagId?: string; children: ReactNode; } export default function Button(props: ButtonProps) { - const { width, boxType, colorSystem, handleClickFn, children } = props; + const { width, boxType, colorSystem, handleClickFn, gaTagId, children } = props; return ( {children} diff --git a/components/Common/Modal/ModalForm/ConfirmCancleModal.tsx b/components/Common/Modal/ModalForm/ConfirmCancleModal.tsx index e6dba25b..8ae5a07c 100644 --- a/components/Common/Modal/ModalForm/ConfirmCancleModal.tsx +++ b/components/Common/Modal/ModalForm/ConfirmCancleModal.tsx @@ -11,10 +11,11 @@ interface ConfirmCancleModalPrpos { handleConfirmFn: () => void; leftText?: string; rightText?: string; + gaTagId?: string; } export default function ConfirmCancleModal(props: PropsWithChildren) { - const { handleToggle, handleConfirmFn, leftText, rightText, children } = props; + const { handleToggle, handleConfirmFn, leftText, rightText, gaTagId, children } = props; return ( @@ -34,6 +35,7 @@ export default function ConfirmCancleModal(props: PropsWithChildren {rightText || '확인'} From fde550eb4773322387fb5b18fe0ed0fe5787026d Mon Sep 17 00:00:00 2001 From: myeongheonhong Date: Mon, 5 Feb 2024 17:19:00 +0900 Subject: [PATCH 2/5] =?UTF-8?q?[=20fix=20]=20=EB=A9=94=EC=9D=B8=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=EC=98=88=EC=83=81=EA=B8=88=EC=95=A1=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Common/Modal/MainShareModal.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/Common/Modal/MainShareModal.tsx b/components/Common/Modal/MainShareModal.tsx index b552a399..49a25b32 100644 --- a/components/Common/Modal/MainShareModal.tsx +++ b/components/Common/Modal/MainShareModal.tsx @@ -1,7 +1,7 @@ import theme from '@/styles/theme'; import styled from 'styled-components'; import ShareContent from './ShareContent'; -import { useGetWishesProgress } from '@/hooks/queries/wishes'; +import { useGetMainProgressData, useGetWishesProgress } from '@/hooks/queries/wishes'; import Image from 'next/image'; import { MainCakeImg, MainWishChatImg } from '@/public/assets/images'; import { CloseWhiteIc } from '@/public/assets/icons'; @@ -14,6 +14,7 @@ interface MainShareModalProps { export default function MainShareModal(props: MainShareModalProps) { const { handleToggle } = props; const { wishesProgressData } = useGetWishesProgress(); + const { progressData } = useGetMainProgressData(); return ( <> @@ -28,7 +29,7 @@ export default function MainShareModal(props: MainShareModalProps) { {'예상 케이크 금액\n'} {`총 ${convertMoneyText( - wishesProgressData?.price.toString() || '0', + progressData?.price.toString() || '0', )}원`} From 37c35336b5c92a161dd44b1a40d462808a70f3f1 Mon Sep 17 00:00:00 2001 From: myeongheonhong Date: Mon, 5 Feb 2024 17:19:23 +0900 Subject: [PATCH 3/5] =?UTF-8?q?[=20feat=20]=20=EC=86=8C=EC=9B=90=EB=A7=81?= =?UTF-8?q?=ED=81=AC=20=EA=B3=B5=EC=9C=A0=ED=95=98=EA=B8=B0=20=EC=95=84?= =?UTF-8?q?=EC=9D=B4=EB=94=94=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Common/Modal/ShareContent.tsx | 8 ++++---- constant/snsList.ts | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/components/Common/Modal/ShareContent.tsx b/components/Common/Modal/ShareContent.tsx index 74fd6b53..8bf384d1 100644 --- a/components/Common/Modal/ShareContent.tsx +++ b/components/Common/Modal/ShareContent.tsx @@ -32,11 +32,11 @@ export default function ShareContent() { if (name === 'KakaoTalk') { useKakaoShare(loginUserInfo.nickName, wishesLink); } else if (name === 'FaceBook') { - if (name === 'FaceBook') { - window.open(`http://www.facebook.com/sharer/sharer.php?u=${link}&hashtag=${hashtag}`); - } + window.open(`http://www.facebook.com/sharer/sharer.php?u=${link}&hashtag=${hashtag}`); } else if (name === 'Twitter') { window.open(`https://twitter.com/intent/tweet?text=${text + link}`); + } else if (name === 'Instagram') { + window.open(`https://instagram.com`); } }; @@ -65,7 +65,7 @@ export default function ShareContent() { {SNS_LIST.map((sns) => ( - handleShareSNS(sns.name)}> + handleShareSNS(sns.name)} id={sns.name}> {`${sns.name}`} ))} diff --git a/constant/snsList.ts b/constant/snsList.ts index c34e8162..79348961 100644 --- a/constant/snsList.ts +++ b/constant/snsList.ts @@ -1,17 +1,20 @@ - -import { KaKaoLogoImg, InstaLogoImg, FacebookLogoImg, TwitterLogoImg } from '@/public/assets/images'; +import { + KaKaoLogoImg, + InstaLogoImg, + FacebookLogoImg, + TwitterLogoImg, +} from '@/public/assets/images'; import { SNSListType } from '@/types/snsListType'; - export const SNS_LIST: SNSListType[] = [ { name: 'KakaoTalk', logo: KaKaoLogoImg, }, - // { - // name: 'Instagram', - // logo: InstaLogoImg, - // }, + { + name: 'Instagram', + logo: InstaLogoImg, + }, { name: 'FaceBook', logo: FacebookLogoImg, @@ -20,4 +23,4 @@ export const SNS_LIST: SNSListType[] = [ name: 'Twitter', logo: TwitterLogoImg, }, -]; \ No newline at end of file +]; From 57c803da55e01fdd2f45f50e73e0000180941d20 Mon Sep 17 00:00:00 2001 From: myeongheonhong Date: Mon, 5 Feb 2024 17:22:50 +0900 Subject: [PATCH 4/5] =?UTF-8?q?[=20feat=20]=20=EC=86=8C=EC=9B=90=EB=A7=81?= =?UTF-8?q?=ED=81=AC=20=EC=83=9D=EC=84=B1=20=EC=8B=9C=20=EC=9D=B4=ED=83=88?= =?UTF-8?q?=20=EC=B2=B4=ED=81=AC=EB=A5=BC=20=EC=9C=84=ED=95=9C=20id=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Wishes/Common/WishesStepBtn.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/Wishes/Common/WishesStepBtn.tsx b/components/Wishes/Common/WishesStepBtn.tsx index f03cd8c4..40be30bc 100644 --- a/components/Wishes/Common/WishesStepBtn.tsx +++ b/components/Wishes/Common/WishesStepBtn.tsx @@ -40,6 +40,7 @@ export default function WishesStepBtn(props: WishesStepBtnProps) { boxType="half" colorSystem={wishesStep.getNextBtnColor(wishesStep.nextState)} handleClickFn={handleNextClickFn} + gaTagId={`step${wishesStep.stepIndex}`} > {wishesStep.stepIndex < 4 ? '다음' : '링크 생성 완료!'} From 5746b3f69ae04f0ff4260d1ffb64b88658adfeb0 Mon Sep 17 00:00:00 2001 From: myeongheonhong Date: Mon, 5 Feb 2024 17:27:18 +0900 Subject: [PATCH 5/5] =?UTF-8?q?[=20refactor=20]=20=EB=B6=88=ED=95=84?= =?UTF-8?q?=EC=9A=94=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Common/Button/SnsBox.tsx | 19 ------------------- components/Common/Modal/ShareContent.tsx | 10 +++++++--- 2 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 components/Common/Button/SnsBox.tsx diff --git a/components/Common/Button/SnsBox.tsx b/components/Common/Button/SnsBox.tsx deleted file mode 100644 index ebd387b2..00000000 --- a/components/Common/Button/SnsBox.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import styled from 'styled-components'; - -interface SNSBoxProps { - children: React.ReactNode; - handleClick?: () => void; -} - -export default function SNSBox(props: SNSBoxProps) { - const { children, handleClick } = props; - - return {children}; -} - -const Styled = { - Box: styled.div` - margin: 0 0.5rem 0; - cursor: pointer; - `, -}; diff --git a/components/Common/Modal/ShareContent.tsx b/components/Common/Modal/ShareContent.tsx index 8bf384d1..39167d92 100644 --- a/components/Common/Modal/ShareContent.tsx +++ b/components/Common/Modal/ShareContent.tsx @@ -8,7 +8,6 @@ import { useEffect, useState } from 'react'; import useKakaoShare from '@/hooks/common/useKakaoShare'; import { useRecoilValue } from 'recoil'; import { LoginUserInfo } from '@/recoil/auth/loginUserInfo'; -import SNSBox from '../Button/SnsBox'; import InputLink from '../Input/InputLink'; import { useGetMainProgressData } from '@/hooks/queries/wishes'; @@ -65,9 +64,9 @@ export default function ShareContent() { {SNS_LIST.map((sns) => ( - handleShareSNS(sns.name)} id={sns.name}> + handleShareSNS(sns.name)} id={sns.name}> {`${sns.name}`} - + ))} @@ -98,4 +97,9 @@ const Styled = { color: ${theme.colors.white}; width: 100%; `, + + SNSBox: styled.div` + margin: 0 0.5rem 0; + cursor: pointer; + `, };