diff --git a/.hintrc b/.hintrc index b6db4f4..59c3ed3 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 3bcbe71..1166153 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="다음 페이지" > - - + + -