- {mode === "my" &&
}
+ {myGroupData && Object.keys(myGroupData).length > 0 && (
+
+ )}
{/* header */}
전체크루
{isLoading ? "" : `(${data?.totalCount})`}
- {mode === "list" && (
-
- )}
+ {!myGroupData ||
+ (myGroupData && Object.keys(myGroupData).length === 0 && (
+
+ ))}
{/* sort */}
diff --git a/src/components/Crew/CrewRanking.tsx b/src/components/Crew/MyCrew/CrewRanking.tsx
similarity index 100%
rename from src/components/Crew/CrewRanking.tsx
rename to src/components/Crew/MyCrew/CrewRanking.tsx
diff --git a/src/components/Crew/MyCrew/MyCrewHeader.tsx b/src/components/Crew/MyCrew/MyCrewHeader.tsx
new file mode 100644
index 0000000..590bbe9
--- /dev/null
+++ b/src/components/Crew/MyCrew/MyCrewHeader.tsx
@@ -0,0 +1,21 @@
+import CreateCrewIcon from "@assets/icons/crew-create-button-icon.svg?react"
+
+interface MyCrewHeaderProps {
+ openCreateModal: () => void
+}
+
+export default function MyCrewHeader(props: MyCrewHeaderProps) {
+ const { openCreateModal } = props
+ return (
+
+ )
+}
diff --git a/src/components/Crew/MyCrewRankingContainer.tsx b/src/components/Crew/MyCrew/MyCrewRankingContainer.tsx
similarity index 55%
rename from src/components/Crew/MyCrewRankingContainer.tsx
rename to src/components/Crew/MyCrew/MyCrewRankingContainer.tsx
index 7b37fdc..9a4eb0d 100644
--- a/src/components/Crew/MyCrewRankingContainer.tsx
+++ b/src/components/Crew/MyCrew/MyCrewRankingContainer.tsx
@@ -1,37 +1,35 @@
-import CreateCrewIcon from "@assets/icons/crew-create-button-icon.svg?react"
import SendInvitationIcon from "@assets/icons/crew-send-invitation.svg?react"
import CrewUserIcon from "@assets/icons/crew-user-icon.svg?react"
import { Link } from "react-router-dom"
import CrewRanking from "./CrewRanking"
import RoutePath from "@/constants/routes.json"
+import MyCrewHeader from "./MyCrewHeader"
+import { groupUserRank, MyGroupData } from "@/api"
+import dayjs from "dayjs"
interface MyCrewRankingContainerProps {
+ myGroupData: MyGroupData
+ ranks: groupUserRank[]
+ myRank: groupUserRank | undefined
openCreateModal: () => void
openInviteModal: () => void
}
export default function MyCrewRankingContainer(props: MyCrewRankingContainerProps) {
- const { openCreateModal, openInviteModal } = props
+ const { myGroupData, ranks, myRank, openCreateModal, openInviteModal } = props
return (
-
+
-
주인공 다 모여랏
+
{myGroupData.name}
- 7/30명
+
+ {myGroupData.userCount}/{myGroupData.userCapacity}명
+
{/* 랭킹 표시 */}
-
+ {ranks.length > 0 && myRank && }
diff --git a/src/components/SideNav.tsx b/src/components/SideNav.tsx
index d30c38c..451bb1f 100644
--- a/src/components/SideNav.tsx
+++ b/src/components/SideNav.tsx
@@ -81,7 +81,7 @@ export default function SideNav(): React.ReactElement {