From aca2c47e2de0468a5d96ac705738bb503448303b Mon Sep 17 00:00:00 2001 From: andyye <63383967+0ev@users.noreply.github.com> Date: Tue, 26 Sep 2023 22:15:49 +0900 Subject: [PATCH 1/3] Fix: make text shorter --- src/components/ModalPopup/ModalEvent2023FallItem.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ModalPopup/ModalEvent2023FallItem.tsx b/src/components/ModalPopup/ModalEvent2023FallItem.tsx index 2e87701c5..0f7ab0324 100644 --- a/src/components/ModalPopup/ModalEvent2023FallItem.tsx +++ b/src/components/ModalPopup/ModalEvent2023FallItem.tsx @@ -77,11 +77,11 @@ const ModalEvent2023FallItem = ({ eventMode !== "2023fall" ? [true, "이벤트 기간이 아닙니다"] : itemInfo.stock <= 0 - ? [true, "매진된 상품은 구매할 수 없습니다"] + ? [true, "매진된 상품입니다"] : !event2023FallInfo || !isLogin ? [true, "로그인 후 구매가 가능합니다"] : event2023FallInfo.creditAmount < itemInfo.price - ? [true, "송편이 부족하여 구매할 수 없습니다"] + ? [true, "송편이 부족합니다"] : [false, "구매하기"], [eventMode, event2023FallInfo, itemInfo] ); From 0506f17348b83648ee4fc6e9ca1e906aab533609 Mon Sep 17 00:00:00 2001 From: andyye <63383967+0ev@users.noreply.github.com> Date: Tue, 26 Sep 2023 22:50:58 +0900 Subject: [PATCH 2/3] Fix: change history action --- src/components/Header/HeaderWithLeftNav.tsx | 2 +- src/pages/Event/Event2023FallHistory.tsx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Header/HeaderWithLeftNav.tsx b/src/components/Header/HeaderWithLeftNav.tsx index 34cbd46f3..f1c1153e5 100644 --- a/src/components/Header/HeaderWithLeftNav.tsx +++ b/src/components/Header/HeaderWithLeftNav.tsx @@ -53,7 +53,7 @@ const HeaderWithLeftNav = ({ value, options = [] }: HeaderWithLeftNavProps) => (
{options.map(({ value: _value, label, to }) => ( - + {label} diff --git a/src/pages/Event/Event2023FallHistory.tsx b/src/pages/Event/Event2023FallHistory.tsx index c85e302fa..123cf3c74 100644 --- a/src/pages/Event/Event2023FallHistory.tsx +++ b/src/pages/Event/Event2023FallHistory.tsx @@ -186,13 +186,13 @@ const Event2023FallHistory = () => { 🎁 지급 방법 : 각 상품 별 지급 방법은 아래와 같습니다.
- 1. 북측 매점 교환권 : 교양분관 SPARCS 동방에서 교환권을 수령하실 - 수 있습니다. + 1. 북측 매점 교환권 / 교내 엔제리너스 아이스 아메리카노 S: (엔터 + 넣어주세요) 교양분관 SPARCS 동방에서 교환권을 수령하실 수 + 있습니다.
- 2. 교내 엔제리너스 아이스 아메리카노 S / BBQ 황금올리브+콜라1.25L - / 오색송편 : 이벤트 참여 때 등록한 연락처로 기프티콘을 발송해 - 드립니다. + 2. BBQ 황금올리브+콜라 1.25L / 오색송편: 이벤트 참여 때 등록한 + 연락처로 기프티콘을 발송해 드립니다.
From 5e475c817c2a659fa8e52229888535f36b7f1f82 Mon Sep 17 00:00:00 2001 From: 14Kgun Date: Wed, 27 Sep 2023 06:37:43 +0900 Subject: [PATCH 3/3] Fix: ModalEvent2023FallRandomBox --- .../ModalEvent2023FallItemInstagram.tsx | 13 ++++++- .../ModalEvent2023FallRandomBox.tsx | 36 +++++++++++++------ .../Event2023FallStore/ItemListSection.tsx | 1 + 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/components/ModalPopup/ModalEvent2023FallItemInstagram.tsx b/src/components/ModalPopup/ModalEvent2023FallItemInstagram.tsx index 85e7124e0..a237c2335 100644 --- a/src/components/ModalPopup/ModalEvent2023FallItemInstagram.tsx +++ b/src/components/ModalPopup/ModalEvent2023FallItemInstagram.tsx @@ -18,6 +18,13 @@ type ModalEvent2023FallItemInstagramProps = { item?: EventItem } & Parameters< typeof Modal >[0]; +const Background = () => ( +
+
+
+
+); + const ModalEvent2023FallItemInstagram = ({ item, ...modalProps @@ -43,7 +50,11 @@ const ModalEvent2023FallItemInstagram = ({ }; return ( - + } + {...modalProps} + >
인스타그램 스토리에 공유하기 diff --git a/src/components/ModalPopup/ModalEvent2023FallRandomBox.tsx b/src/components/ModalPopup/ModalEvent2023FallRandomBox.tsx index 1083e0bc4..55cb0e2a1 100644 --- a/src/components/ModalPopup/ModalEvent2023FallRandomBox.tsx +++ b/src/components/ModalPopup/ModalEvent2023FallRandomBox.tsx @@ -1,4 +1,11 @@ -import { memo, useCallback, useEffect, useState } from "react"; +import { + Dispatch, + SetStateAction, + memo, + useCallback, + useEffect, + useState, +} from "react"; import type { EventItem } from "types/event2023fall"; @@ -23,12 +30,14 @@ const Background = () => (
); -type ModalEvent2023FallRandomBoxProps = { item?: EventItem } & Parameters< - typeof Modal ->[0]; +type ModalEvent2023FallRandomBoxProps = { + item?: EventItem; + setShareItem?: Dispatch>>; +} & Parameters[0]; const ModalEvent2023FallRandomBox = ({ item, + setShareItem, ...modalProps }: ModalEvent2023FallRandomBoxProps) => { const [isBoxOpend, setIsBoxOpend] = useState(false); @@ -36,6 +45,14 @@ const ModalEvent2023FallRandomBox = ({ const isDisplayItemName = useDelay(isBoxOpend, !isBoxOpend, 6000); const onClickOk = useCallback(() => setIsBoxOpend(true), []); + const onChangeIsOpen = useCallback( + (isOpen: boolean) => { + if (!isOpen && item) setShareItem?.(item); + modalProps?.onChangeIsOpen?.(isOpen); + }, + [item, setShareItem, modalProps] + ); + useEffect(() => { if (!modalProps.isOpen) setIsBoxOpend(false); }, [modalProps.isOpen]); @@ -58,10 +75,11 @@ const ModalEvent2023FallRandomBox = ({ return ( : undefined} - {...modalProps} + onEnter={onClickOk} + onChangeIsOpen={onChangeIsOpen} >
@@ -102,11 +120,7 @@ const ModalEvent2023FallRandomBox = ({ ...theme.font14_bold, }} disabled={isDisplayItemName ? false : isBoxOpend} - onClick={ - isDisplayItemName - ? () => modalProps?.onChangeIsOpen?.(false) - : onClickOk - } + onClick={isDisplayItemName ? () => onChangeIsOpen(false) : onClickOk} > {isDisplayItemName ? "확인" : "박스 열기"} diff --git a/src/pages/Event/Event2023FallStore/ItemListSection.tsx b/src/pages/Event/Event2023FallStore/ItemListSection.tsx index d8c9407a4..0c757d71f 100644 --- a/src/pages/Event/Event2023FallStore/ItemListSection.tsx +++ b/src/pages/Event/Event2023FallStore/ItemListSection.tsx @@ -125,6 +125,7 @@ const EventItemContainer = ({ value, fetchItems }: EventItemComponentProps) => { isOpen={!!rewardItem} onChangeIsOpen={() => setRewardItem(null)} item={rewardItem || undefined} + setShareItem={setShareItem} /> )}