From ba8ed2033e6a2e52495f1738f76654cf6dbf91cb Mon Sep 17 00:00:00 2001 From: Hyeok Min Kwon Date: Tue, 24 Sep 2024 16:13:42 +0900 Subject: [PATCH 1/2] Edit sponsor API models --- src/models/api/sponsor.ts | 2 +- src/models/sponsor.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/api/sponsor.ts b/src/models/api/sponsor.ts index 7a0857e..a217c44 100644 --- a/src/models/api/sponsor.ts +++ b/src/models/api/sponsor.ts @@ -40,7 +40,7 @@ export type APISponsorLevelOnly = { export type APISponsorLevelWithSponsor = { id: number; name: string; - desc: string; + desc?: string; visible: boolean; order: number; sponsor: APISponsor[]; diff --git a/src/models/sponsor.ts b/src/models/sponsor.ts index 210a151..9a9d315 100644 --- a/src/models/sponsor.ts +++ b/src/models/sponsor.ts @@ -76,7 +76,7 @@ export class SponsorLevel { export class SponsorLevelWithSponsor { id: number; name: string; - desc: string; + desc?: string; visible: boolean; order: number; sponsor: Sponsor[]; From 25318864825ae18c8b099dc03140779fabeb1f9c Mon Sep 17 00:00:00 2001 From: Hyeok Min Kwon Date: Tue, 24 Sep 2024 16:14:03 +0900 Subject: [PATCH 2/2] Only show sponsor exist sponsor level --- src/components/Footer/SponsorList.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/Footer/SponsorList.tsx b/src/components/Footer/SponsorList.tsx index 905477d..ffa9a65 100644 --- a/src/components/Footer/SponsorList.tsx +++ b/src/components/Footer/SponsorList.tsx @@ -20,13 +20,15 @@ const SponsorList = () => {

{t("후원사 목록")}

- {listOfSponsorLevel.map((level) => ( - - ))} + {listOfSponsorLevel + .filter((level) => level.sponsor.length !== 0) + .map((level) => ( + + ))}