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;