diff --git a/src/assets/images/mycrew-no-ranks.png b/src/assets/images/mycrew-no-ranks.png new file mode 100644 index 0000000..df07e62 Binary files /dev/null and b/src/assets/images/mycrew-no-ranks.png differ diff --git a/src/components/Crew/MyCrew/MyCrewRankingContainer.tsx b/src/components/Crew/MyCrew/MyCrewRankingContainer.tsx index 45504f7..5398cf0 100644 --- a/src/components/Crew/MyCrew/MyCrewRankingContainer.tsx +++ b/src/components/Crew/MyCrew/MyCrewRankingContainer.tsx @@ -7,6 +7,7 @@ import RoutePath from "@/constants/routes.json" import MyCrewHeader from "./MyCrewHeader" import { groupUserRank, MyGroupData } from "@/api" import dayjs from "dayjs" +import NoRanksImage from "@/assets/images/mycrew-no-ranks.png" interface MyCrewRankingContainerProps { myGroupData: MyGroupData @@ -58,7 +59,18 @@ export default function MyCrewRankingContainer(props: MyCrewRankingContainerProp {/* 랭킹 표시 */} -
{ranks.length > 0 && myRank && }
+
+ {ranks.length > 0 && myRank ? ( + + ) : ( +
+
+ +
표시할 랭킹이 없습니다.
+
+
+ )} +
) diff --git a/src/components/Posture/Controls.tsx b/src/components/Posture/Controls.tsx index 29fde2f..de0c168 100644 --- a/src/components/Posture/Controls.tsx +++ b/src/components/Posture/Controls.tsx @@ -8,21 +8,21 @@ const Controls: React.FC<{ return (
diff --git a/src/components/Posture/PostrueCrew.tsx b/src/components/Posture/PostrueCrew.tsx index 28f40bc..0cd54a4 100644 --- a/src/components/Posture/PostrueCrew.tsx +++ b/src/components/Posture/PostrueCrew.tsx @@ -14,6 +14,10 @@ import RankingGuideToolTip from "@assets/images/ranking-guide.png" import SelectBox from "@components/SelectBox" import { ReactElement, useCallback, useEffect, useRef, useState } from "react" import { modals } from "../Modal/Modals" +import useMyGroup from "@/hooks/useMyGroup" +import EmptyGroupImage from "@/assets/images/crew-empty.png" +import { useNavigate } from "react-router-dom" +import RoutePath from "@/constants/routes.json" interface IPostureCrew { groupUserId: number @@ -131,6 +135,8 @@ export default function PostrueCrew(props: PostureCrewProps): ReactElement { const { notification, setNotification } = useNotification() const updateNotiMutation = useModifyNoti() const { hasPermission } = usePushNotification() + const { myGroupData } = useMyGroup() + const navigate = useNavigate() const onClickCloseSideNavButton = (): void => { toggleSidebar() @@ -227,12 +233,12 @@ export default function PostrueCrew(props: PostureCrewProps): ReactElement {
- {isConnected === "loading" &&

서버와 연결 중입니다.

} - {isConnected === "disconnected" &&

서버와 연결 끊어졌습니다.

} - {isConnected === "success" && crews.length === 0 && ( + {isConnected === "loading" && myGroupData &&

서버와 연결 중입니다.

} + {isConnected === "disconnected" && myGroupData &&

서버와 연결 끊어졌습니다.

} + {isConnected === "success" && myGroupData && crews.length === 0 && (

접속자가 없습니다.

)} - {isConnected === "success" && crews.length > 0 && ( + {isConnected === "success" && myGroupData && crews.length > 0 && ( )} + {!myGroupData && ( +
+
+ 아직 가입한 +
+ 크루가 없어요 +
+ + +
+ )}