From 03e85143d787c3af88dcf0520c378fd07fb8df2a Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 2 Jul 2024 14:02:22 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20challenge=20get=20API=EC=97=90=EC=84=9C?= =?UTF-8?q?=20location,=20=ED=83=9C=EA=B7=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/challenge.ts | 1 - components/home/adminChallenge.tsx | 13 +++---------- components/home/challenge.tsx | 15 +++------------ components/home/tag.tsx | 11 ----------- 4 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 components/home/tag.tsx diff --git a/apis/challenge.ts b/apis/challenge.ts index e1c4ca9..d71a874 100644 --- a/apis/challenge.ts +++ b/apis/challenge.ts @@ -8,7 +8,6 @@ export interface Challenge { challengeIdx: number; name: string; participantsCount: number; - location: string; locatedPlace: string; schedule: string; myAttendanceRate: number; diff --git a/components/home/adminChallenge.tsx b/components/home/adminChallenge.tsx index 387d54a..6807323 100644 --- a/components/home/adminChallenge.tsx +++ b/components/home/adminChallenge.tsx @@ -3,7 +3,6 @@ import FlexBox from "../Flexbox"; import { useRouter } from "next/router"; import { Challenge as ChallengeType } from "@/apis/challenge"; import { usePostAttendanceCode } from "@/apis/hooks/admin"; -import Tag from "./tag"; interface ChallengeProps { setIsModalVisible: React.Dispatch>; @@ -22,18 +21,12 @@ const AdminChallenge: NextPage = ({ return ( - +
{challengeInfo.name}
- - {challengeInfo.location !== null ? ( - - ) : null} - -
- {challengeInfo.locatedPlace ?? challengeInfo.location} |{" "} - {challengeInfo.schedule} + {challengeInfo.locatedPlace ? `${challengeInfo.locatedPlace} | ` : ""} + 매주 {challengeInfo.schedule}요일
diff --git a/components/home/challenge.tsx b/components/home/challenge.tsx index a945d86..a743b14 100644 --- a/components/home/challenge.tsx +++ b/components/home/challenge.tsx @@ -4,7 +4,6 @@ import { useRouter } from "next/router"; import { Challenge as ChallengeType } from "@/apis/challenge"; import { useAtom } from "jotai"; import { challengeIdxAtom } from "@/utils/atom"; -import Tag from "./tag"; interface ChallengeProps { setIsModalVisible: React.Dispatch>; @@ -31,22 +30,14 @@ const Challenge: NextPage = ({ onClick={() => router.push("/challenge")} > - -
{challengeInfo.name}
- - {challengeInfo.location !== null ? ( - - ) : null} - - -
+
{challengeInfo.name}
{challengeInfo.participantsCount}명 참여 중
- {challengeInfo.locatedPlace ?? challengeInfo.location} | 매주{" "} - {challengeInfo.schedule}요일 + {challengeInfo.locatedPlace ? `${challengeInfo.locatedPlace} | ` : ""} + 매주 {challengeInfo.schedule}요일
diff --git a/components/home/tag.tsx b/components/home/tag.tsx deleted file mode 100644 index 7c2817b..0000000 --- a/components/home/tag.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { NextPage } from "next"; - -interface TagProps { - name: string; -} - -const Tag: NextPage = ({ name }: TagProps) => { - return
#{name}
; -}; - -export default Tag;