From 575f2d7db5f57378d50e190dae9d51f5202b6dc2 Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Wed, 18 Jun 2025 23:56:10 +0900 Subject: [PATCH 01/15] =?UTF-8?q?=E2=9C=A8=20feat:=20=EC=83=81=EB=8B=A8(?= =?UTF-8?q?=EB=82=B4=20=EA=B0=80=EA=B2=8C)=20section=20=ED=83=9C=EA=B7=B8?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/myprofile/Store.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/myprofile/Store.tsx b/src/pages/myprofile/Store.tsx index 87db0e77..f16bf309 100644 --- a/src/pages/myprofile/Store.tsx +++ b/src/pages/myprofile/Store.tsx @@ -1,3 +1,7 @@ export default function Store() { - return
내 가게 정보 상세(사장님)
; + return ( + <> +
+ + ); } From f3f78a9fcf600f7b484dc3390c0a69336f6dc90d Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Thu, 19 Jun 2025 14:11:23 +0900 Subject: [PATCH 02/15] =?UTF-8?q?=E2=9C=A8=20feat:=20=EC=B4=88=EA=B8=B0=20?= =?UTF-8?q?api=20request=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index f16bf309..449a22ba 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -1,4 +1,19 @@ +import { useEffect, useState } from 'react'; +import { getUser } from '@/api/userApi'; +import type { ShopItem } from '@/api/shopApi'; + export default function Store() { + const [shop, setShop] = useState(null); + + useEffect(() => { + const userId = localStorage.getItem('userId'); + if (!userId) return; + (async () => { + const userResponse = await getUser(userId); + setShop(userResponse.item.shop?.item ?? null); + })(); + }, []); + return ( <>
From 1999fdd382c181d510638aa411e94aaa7019872b Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Thu, 19 Jun 2025 14:15:05 +0900 Subject: [PATCH 03/15] =?UTF-8?q?=E2=9C=A8=20feat:=20=ED=95=98=EB=8B=A8(?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=ED=95=9C=20=EA=B3=B5=EA=B3=A0)=20section=20?= =?UTF-8?q?=ED=83=9C=EA=B7=B8=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index 449a22ba..33aa7f6b 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -17,6 +17,7 @@ export default function Store() { return ( <>
+ {shop &&
} ); } From 1ef1ff586eda87fb415bc44474c47fce173d98c3 Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Thu, 19 Jun 2025 14:28:40 +0900 Subject: [PATCH 04/15] =?UTF-8?q?=F0=9F=8E=A8=20style:=20section=20padding?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index 33aa7f6b..bf1d585a 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -16,8 +16,10 @@ export default function Store() { return ( <> -
- {shop &&
} +
+ {shop && ( +
+ )} ); } From ccc61aad202f9267885ddca624eb640029b549ca Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Thu, 19 Jun 2025 14:30:32 +0900 Subject: [PATCH 05/15] =?UTF-8?q?=E2=9C=A8=20feat:=20section=20=EB=82=B4?= =?UTF-8?q?=EB=B6=80=20div=20=ED=83=9C=EA=B7=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index bf1d585a..0a213af2 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -16,9 +16,13 @@ export default function Store() { return ( <> -
+
+
+
{shop && ( -
+
+
+
)} ); From 7a8f7c74ba99718302ddb7d69c270b4d6b8c4c49 Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Fri, 20 Jun 2025 13:19:34 +0900 Subject: [PATCH 06/15] =?UTF-8?q?=E2=9C=A8=20feat:=20=EB=B9=84=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EC=83=81=ED=83=9C=EB=A5=BC=20=EC=9C=84?= =?UTF-8?q?=ED=95=9C=20Modal=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index 0a213af2..ee9bc506 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -1,13 +1,24 @@ import { useEffect, useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import { getUser } from '@/api/userApi'; import type { ShopItem } from '@/api/shopApi'; +import Modal from '@/components/common/Modal'; export default function Store() { + const navigate = useNavigate(); const [shop, setShop] = useState(null); + const [isModalOpen, setIsModalOpen] = useState(false); + + const handleClose = () => { + navigate('/login'); + }; useEffect(() => { const userId = localStorage.getItem('userId'); - if (!userId) return; + if (!userId) { + setIsModalOpen(true); + return; + } (async () => { const userResponse = await getUser(userId); setShop(userResponse.item.shop?.item ?? null); @@ -24,6 +35,11 @@ export default function Store() {
)} + {isModalOpen && ( + + 로그인이 필요합니다. + + )} ); } From 3734f1b9dfc7aa5fd7c6bc4578c9e20f2a1597b9 Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Fri, 20 Jun 2025 13:53:39 +0900 Subject: [PATCH 07/15] =?UTF-8?q?=E2=9C=A8=20feat:=20api=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=98=A4=EB=A5=98=20=EC=8B=9C=20Modal=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 추후 모달이 아닌 다른 방식으로 수정 필요할 듯 함 --- src/pages/store/Store.tsx | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index ee9bc506..17a65808 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -8,21 +8,33 @@ export default function Store() { const navigate = useNavigate(); const [shop, setShop] = useState(null); const [isModalOpen, setIsModalOpen] = useState(false); + const [modalContent, setModalContent] = useState(''); const handleClose = () => { - navigate('/login'); + if (modalContent.startsWith('로그인')) { + navigate('/login'); + } else { + setIsModalOpen(false); + } }; useEffect(() => { const userId = localStorage.getItem('userId'); if (!userId) { setIsModalOpen(true); + setModalContent('로그인이 필요합니다.'); return; } - (async () => { - const userResponse = await getUser(userId); - setShop(userResponse.item.shop?.item ?? null); - })(); + + try { + (async () => { + const userResponse = await getUser(userId); + setShop(userResponse.item.shop?.item ?? null); + })(); + } catch (error) { + setIsModalOpen(true); + setModalContent((error as Error).message); + } }, []); return ( @@ -37,7 +49,7 @@ export default function Store() { )} {isModalOpen && ( - 로그인이 필요합니다. + {modalContent} )} From 713884d7f06b303507260c23dc5c0f42ed33aa12 Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Fri, 20 Jun 2025 14:28:35 +0900 Subject: [PATCH 08/15] =?UTF-8?q?=E2=9C=A8=20feat:=20loadNotices=20?= =?UTF-8?q?=ED=95=A8=EC=88=98,=20notices=20state,=20noticeOffset=20ref=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index 17a65808..1580cd17 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -1,14 +1,19 @@ -import { useEffect, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { getUser } from '@/api/userApi'; import type { ShopItem } from '@/api/shopApi'; +import { getShopNotices, type NoticeInfo } from '@/api/noticeApi'; import Modal from '@/components/common/Modal'; +const NOTICES_LIMIT = 12; + export default function Store() { const navigate = useNavigate(); const [shop, setShop] = useState(null); + const [notices, setNotices] = useState([]); const [isModalOpen, setIsModalOpen] = useState(false); const [modalContent, setModalContent] = useState(''); + const noticesOffset = useRef(0); const handleClose = () => { if (modalContent.startsWith('로그인')) { @@ -18,6 +23,17 @@ export default function Store() { } }; + const loadNotices = async () => { + if (!shop || noticesOffset.current < 0) return; + const noticesResponse = await getShopNotices(shop.id, { + offset: noticesOffset.current, + limit: NOTICES_LIMIT, + }); + setNotices((prev) => [...prev, ...noticesResponse.items]); + if (noticesResponse.hasNext) noticesOffset.current += NOTICES_LIMIT; + else noticesOffset.current = -1; + }; + useEffect(() => { const userId = localStorage.getItem('userId'); if (!userId) { From b8ec8ddfe953be07f7a059bb10ee3068bd67f2de Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Fri, 20 Jun 2025 15:40:31 +0900 Subject: [PATCH 09/15] =?UTF-8?q?=E2=9C=A8=20feat:=20useCallback=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index 1580cd17..1d7ab7f6 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef, useState } from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { getUser } from '@/api/userApi'; import type { ShopItem } from '@/api/shopApi'; @@ -15,15 +15,15 @@ export default function Store() { const [modalContent, setModalContent] = useState(''); const noticesOffset = useRef(0); - const handleClose = () => { + const handleClose = useCallback(() => { if (modalContent.startsWith('로그인')) { navigate('/login'); } else { setIsModalOpen(false); } - }; + }, [navigate, modalContent]); - const loadNotices = async () => { + const loadNotices = useCallback(async () => { if (!shop || noticesOffset.current < 0) return; const noticesResponse = await getShopNotices(shop.id, { offset: noticesOffset.current, @@ -32,7 +32,7 @@ export default function Store() { setNotices((prev) => [...prev, ...noticesResponse.items]); if (noticesResponse.hasNext) noticesOffset.current += NOTICES_LIMIT; else noticesOffset.current = -1; - }; + }, [shop]); useEffect(() => { const userId = localStorage.getItem('userId'); From 8dacbdd5387ec59c539795764d5b5bf1c63eb6e4 Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Fri, 20 Jun 2025 15:44:40 +0900 Subject: [PATCH 10/15] =?UTF-8?q?=E2=9C=A8=20feat:=20=EB=AC=B4=ED=95=9C=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EB=A1=9C=EC=A7=81=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test 부족 --- src/pages/store/Store.tsx | 53 +++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index 1d7ab7f6..b6992ec9 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -11,9 +11,11 @@ export default function Store() { const navigate = useNavigate(); const [shop, setShop] = useState(null); const [notices, setNotices] = useState([]); + const noticesOffset = useRef(0); const [isModalOpen, setIsModalOpen] = useState(false); const [modalContent, setModalContent] = useState(''); - const noticesOffset = useRef(0); + const [isLoading, setIsLoading] = useState(false); + const observerRef = useRef(null); const handleClose = useCallback(() => { if (modalContent.startsWith('로그인')) { @@ -25,13 +27,19 @@ export default function Store() { const loadNotices = useCallback(async () => { if (!shop || noticesOffset.current < 0) return; - const noticesResponse = await getShopNotices(shop.id, { - offset: noticesOffset.current, - limit: NOTICES_LIMIT, - }); - setNotices((prev) => [...prev, ...noticesResponse.items]); - if (noticesResponse.hasNext) noticesOffset.current += NOTICES_LIMIT; - else noticesOffset.current = -1; + setIsLoading(true); + try { + const noticesResponse = await getShopNotices(shop.id, { + offset: noticesOffset.current, + limit: NOTICES_LIMIT, + }); + setNotices((prev) => [...prev, ...noticesResponse.items]); + if (noticesResponse.hasNext) noticesOffset.current += NOTICES_LIMIT; + else noticesOffset.current = -1; + setIsLoading(false); + } catch { + setIsLoading('error'); + } }, [shop]); useEffect(() => { @@ -53,6 +61,26 @@ export default function Store() { } }, []); + // 무한 스크롤 + useEffect(() => { + const observer = new IntersectionObserver( + (entries) => { + if (entries[0].isIntersecting && !isLoading) { + loadNotices(); + } + }, + { + rootMargin: '300px', + }, + ); + + const { current } = observerRef; + if (current) observer.observe(current); + return () => { + if (current) observer.unobserve(current); + }; + }, [loadNotices, isLoading]); + return ( <>
@@ -61,6 +89,15 @@ export default function Store() { {shop && (
+ {/* 스크롤 감지 요소 */} +
+ {isLoading === 'error' + ? '데이터를 불러오는데 실패했습니다.' + : isLoading && '로딩 중...'} +
)} {isModalOpen && ( From a115c37195cf22c76388547bdc34184802317749 Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Fri, 20 Jun 2025 16:05:13 +0900 Subject: [PATCH 11/15] =?UTF-8?q?=E2=9C=A8=20feat:=20=EC=A0=9C=EB=AA=A9(h1?= =?UTF-8?q?)=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index b6992ec9..29024cb7 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -84,11 +84,17 @@ export default function Store() { return ( <>
-
+
+

내 가게

+
{shop && (
-
+
+

+ {notices[0] && '내가 '}등록한 공고 +

+
{/* 스크롤 감지 요소 */}
Date: Fri, 20 Jun 2025 22:02:38 +0900 Subject: [PATCH 12/15] =?UTF-8?q?=E2=9C=A8=20feat:=20isMobile=20state=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=EB=82=B4=20=EA=B0=80=EA=B2=8C?= =?UTF-8?q?=20=EC=B9=B4=EB=93=9C=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index 29024cb7..c55e7ff1 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -4,6 +4,9 @@ import { getUser } from '@/api/userApi'; import type { ShopItem } from '@/api/shopApi'; import { getShopNotices, type NoticeInfo } from '@/api/noticeApi'; import Modal from '@/components/common/Modal'; +import RegisterLayout from '@/components/layout/RegisterLayout'; +import Button from '@/components/common/Button'; +import ic_location from '@/assets/icons/location-red.svg'; const NOTICES_LIMIT = 12; @@ -16,6 +19,7 @@ export default function Store() { const [modalContent, setModalContent] = useState(''); const [isLoading, setIsLoading] = useState(false); const observerRef = useRef(null); + const [isMobile, setIsMobile] = useState(window.innerWidth < 768); const handleClose = useCallback(() => { if (modalContent.startsWith('로그인')) { @@ -81,11 +85,61 @@ export default function Store() { }; }, [loadNotices, isLoading]); + // 반응형 + useEffect(() => { + const handleResize = () => { + setIsMobile(window.innerWidth < 768); + }; + window.addEventListener('resize', handleResize); + return () => window.removeEventListener('resize', handleResize); + }, []); + return ( <>

내 가게

+ {shop ? ( +
+
+
+
+
+
+ 식당 +
+
{shop.name}
+
+
+ + {shop.address1} +
+
{shop.description}
+
+
+ + +
+
+
+ ) : ( + + )}
{shop && ( From e5c1d5e5003f129b692a28f502578bd5197310ef Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Fri, 20 Jun 2025 22:45:02 +0900 Subject: [PATCH 13/15] =?UTF-8?q?=E2=9C=A8=20feat:=20=EB=93=B1=EB=A1=9D=20?= =?UTF-8?q?=EA=B3=B5=EA=B3=A0=20=EB=B6=80=EB=B6=84=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index c55e7ff1..dac4082e 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef, useState } from 'react'; -import { useNavigate } from 'react-router-dom'; +import { Link, useNavigate } from 'react-router-dom'; import { getUser } from '@/api/userApi'; import type { ShopItem } from '@/api/shopApi'; import { getShopNotices, type NoticeInfo } from '@/api/noticeApi'; @@ -7,6 +7,7 @@ import Modal from '@/components/common/Modal'; import RegisterLayout from '@/components/layout/RegisterLayout'; import Button from '@/components/common/Button'; import ic_location from '@/assets/icons/location-red.svg'; +import Post from '@/components/common/Post'; const NOTICES_LIMIT = 12; @@ -148,10 +149,26 @@ export default function Store() {

{notices[0] && '내가 '}등록한 공고

+ {notices[0] ? ( +
+ {notices.map((notice) => ( + + + + ))} +
+ ) : ( + + )}
{/* 스크롤 감지 요소 */}
{isLoading === 'error' From 3ad6878e741f343f3f414004df6930e8c0bfaec0 Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Fri, 20 Jun 2025 23:36:49 +0900 Subject: [PATCH 14/15] =?UTF-8?q?=E2=9C=A8=20feat:=20Footer=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=8F=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EA=B0=90?= =?UTF-8?q?=EC=A7=80=20=EC=9A=94=EC=86=8C=20=EC=8A=A4=ED=83=80=EC=9D=BC=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/pages/store/Store.tsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index dac4082e..51546e0f 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -8,6 +8,7 @@ import RegisterLayout from '@/components/layout/RegisterLayout'; import Button from '@/components/common/Button'; import ic_location from '@/assets/icons/location-red.svg'; import Post from '@/components/common/Post'; +import Footer from '@/components/layout/Footer'; const NOTICES_LIMIT = 12; @@ -96,7 +97,7 @@ export default function Store() { }, []); return ( - <> +

내 가게

@@ -144,7 +145,7 @@ export default function Store() {
{shop && ( -
+

{notices[0] && '내가 '}등록한 공고 @@ -168,20 +169,25 @@ export default function Store() {

{/* 스크롤 감지 요소 */}
- {isLoading === 'error' - ? '데이터를 불러오는데 실패했습니다.' - : isLoading && '로딩 중...'} + {isLoading && ( +
+ {isLoading === 'error' + ? '데이터를 불러오는데 실패했습니다.' + : '로딩 중...'} +
+ )}
)} +
{isModalOpen && ( {modalContent} )} - +
); } From b7a24d29250c4664b33f305a0f8933a531d04139 Mon Sep 17 00:00:00 2001 From: Moon-ju-young Date: Sat, 21 Jun 2025 16:30:15 +0900 Subject: [PATCH 15/15] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EB=90=9C=20Post=EC=97=90=20=EB=A7=9E?= =?UTF-8?q?=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/store/Store.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/pages/store/Store.tsx b/src/pages/store/Store.tsx index 51546e0f..74e398b7 100644 --- a/src/pages/store/Store.tsx +++ b/src/pages/store/Store.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef, useState } from 'react'; -import { Link, useNavigate } from 'react-router-dom'; +import { useNavigate } from 'react-router-dom'; import { getUser } from '@/api/userApi'; import type { ShopItem } from '@/api/shopApi'; import { getShopNotices, type NoticeInfo } from '@/api/noticeApi'; @@ -153,14 +153,10 @@ export default function Store() { {notices[0] ? (
{notices.map((notice) => ( - - - + data={{ ...notice.item, shop: { item: shop, href: '' } }} + /> ))}
) : (