diff --git a/src/v1/profile/group/ProfileGroupContainer.tsx b/src/v1/profile/group/ProfileGroupContainer.tsx
index 77baa13ba..506e40130 100644
--- a/src/v1/profile/group/ProfileGroupContainer.tsx
+++ b/src/v1/profile/group/ProfileGroupContainer.tsx
@@ -1,4 +1,5 @@
import useMyGroupsQuery from '@/queries/group/useMyGroupQuery';
+import useMyProfileQuery from '@/queries/user/useMyProfileQuery';
import { APIUser } from '@/types/user';
import ProfileGroupPresenter from './ProfileGroupPresenter';
@@ -8,10 +9,17 @@ const ProfileGroupContainer = ({
userId: 'me' | APIUser['userId'];
}) => {
const { isSuccess, data } = useMyGroupsQuery({ suspense: true });
+ const {
+ data: { userId: myId },
+ } = useMyProfileQuery({ enabled: userId === 'me' });
+
+ const isMeOwner = (ownerId: number) => ownerId === myId;
if (!isSuccess) return null;
- return
;
+ return (
+
+ );
};
export default ProfileGroupContainer;
diff --git a/src/v1/profile/group/ProfileGroupPresenter.tsx b/src/v1/profile/group/ProfileGroupPresenter.tsx
index 38c99fae4..d72ab3874 100644
--- a/src/v1/profile/group/ProfileGroupPresenter.tsx
+++ b/src/v1/profile/group/ProfileGroupPresenter.tsx
@@ -7,14 +7,16 @@ import Link from 'next/link';
interface ProfileGroupPresenterProps {
userId: 'me' | APIUser['userId'];
bookGroups: APIGroup[];
+ isGroupOwner?: (ownerId: number) => boolean;
}
const ProfileGroupPresenter = ({
userId,
bookGroups,
+ isGroupOwner,
}: ProfileGroupPresenterProps) => {
return (
-
+
참여한 모임
@@ -22,13 +24,13 @@ const ProfileGroupPresenter = ({
-
- {bookGroups.map(({ bookGroupId, title, book: { imageUrl } }) => (
+
+ {bookGroups.map(({ bookGroupId, title, owner, book: { imageUrl } }) => (
-