From 31f4828f6674e2c06fd1b71d0743e8f5a4d656cb Mon Sep 17 00:00:00 2001 From: yoonyoungyang Date: Thu, 12 Feb 2026 22:59:52 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=84=ED=96=89=ED=95=9C=20=EC=BA=A0?= =?UTF-8?q?=ED=8E=98=EC=9D=B8=20=ED=8F=B0=ED=8A=B8=20=EC=82=AC=EC=9D=B4?= =?UTF-8?q?=EC=A6=88=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hintrc | 3 +- .../profileCard/CampaignsSection.tsx | 77 ++++++++++++++----- 2 files changed, 61 insertions(+), 19 deletions(-) diff --git a/.hintrc b/.hintrc index b6db4f4d..59c3ed3a 100644 --- a/.hintrc +++ b/.hintrc @@ -18,7 +18,8 @@ "axe/aria": [ "default", { - "aria-valid-attr-value": "off" + "aria-valid-attr-value": "off", + "aria-roles": "off" } ] } diff --git a/app/routes/mypage/components/profileCard/CampaignsSection.tsx b/app/routes/mypage/components/profileCard/CampaignsSection.tsx index 3bcbe715..11661537 100644 --- a/app/routes/mypage/components/profileCard/CampaignsSection.tsx +++ b/app/routes/mypage/components/profileCard/CampaignsSection.tsx @@ -53,10 +53,11 @@ export default function CampaignsSection() { let isMounted = true; const fetchData = async () => { try { - const res = - await axiosInstance.get("/api/v1/campaigns/collaborations/me"); + const res = await axiosInstance.get( + "/api/v1/campaigns/collaborations/me", + ); if (!isMounted) return; - setItems(res.data?.isSuccess ? res.data.result ?? [] : []); + setItems(res.data?.isSuccess ? (res.data.result ?? []) : []); } catch (error) { console.error("캠페인 조회 실패:", error); if (!isMounted) return; @@ -79,7 +80,8 @@ export default function CampaignsSection() { }, [items, safePage]); const pageNumbers = useMemo(() => { - if (totalPages <= 4) return Array.from({ length: totalPages }, (_, i) => i + 1); + if (totalPages <= 4) + return Array.from({ length: totalPages }, (_, i) => i + 1); const start = Math.max(1, Math.min(safePage - 1, totalPages - 3)); return [start, start + 1, start + 2, start + 3]; }, [safePage, totalPages]); @@ -87,7 +89,9 @@ export default function CampaignsSection() { return (
-
진행한 캠페인
+
+ 진행한 캠페인 +
{pageNumbers.map((n) => ( @@ -189,10 +208,19 @@ export default function CampaignsSection() { disabled={safePage === totalPages} aria-label="다음 페이지" > - - + + -