- {/* eslint-disable-next-line no-nested-ternary */}
- {/* //TODO: captin, crew인 경우 로직 수정 */}
- {/* {isCaptain ? (
-
- ) : isCrew ? (
-
- ) : null} */}
-
- {/* 썸네일 */}
-
-
-
-
-
- {/* 메인 내용 */}
-
-
-
- {title}
-
- |
-
- {mainLocation} {subLocation}
-
-
-
-
- {`현재 ${totalGatheringCount}개의 약속이 개설되어 있습니다.`}
-
-
- {/* 세부내용 */}
-
-
-
-
-
모집 정원
-
{participantCount}명
-
-
-
- {confirmed && (
-
-
- 개설 확정
-
- )}
-
-
-
- 최소인원 2명
- 최대인원 {totalCount}명
-
-
-
-
-
- {/* 삭제 확인 모달 */}
-
- 정말로 크루를 삭제하시겠습니까?
-
-
- {/* 탈퇴 확인 모달 */}
-
- 정말로 크루에서 탈퇴하시겠습니까?
-
-
- );
-}
diff --git a/src/components/common/profile/index.tsx b/src/components/common/profile/index.tsx
index df1a6e69..db2055c7 100644
--- a/src/components/common/profile/index.tsx
+++ b/src/components/common/profile/index.tsx
@@ -1,7 +1,9 @@
'use client';
import Image from 'next/image';
+import { cn } from '@/src/utils/cn';
import defaultImage from '@/public/assets/icons/default-profile.svg';
+import captainCheck from '@/public/assets/icons/ic-captain-check.svg';
import editImage from '@/public/assets/icons/profile-edit.svg';
/**
@@ -11,6 +13,7 @@ import editImage from '@/public/assets/icons/profile-edit.svg';
* @param {'small' | 'medium' | 'large'} [props.size='large'] - 프로필의 크기를 결정 기본값은 'large'
* @param {string} [props.imageUrl] - 이미지 URL을 설정 없으면 기본 이미지
* @param {boolean} [props.editable=false] - 프로필 편집시 사용
+ * @param {boolean} [props.isCaptain=false] - 캡틴 여부를 판단
* @param {() => void} [props.onClick] - 프로필을 클릭
* @param {() => void} [props.onEdit] - 편집 버튼을 클릭시
*/
@@ -19,6 +22,7 @@ interface ProfileProps {
size?: 'small' | 'header' | 'large' | 'full';
imageUrl?: string;
editable?: boolean;
+ isCaptain?: boolean;
onClick?: () => void;
onEdit?: () => void;
}
@@ -27,24 +31,35 @@ export function Profile({
size = 'full',
imageUrl,
editable = false,
+ isCaptain = false,
onClick,
onEdit,
}: ProfileProps) {
- const finalSize = editable ? 'large' : size;
+ const finalSize = editable || isCaptain ? 'large' : size;
// 추후 디자인에 따라 수정
const sizeClasses = {
small: 'w-6 h-6',
- header: 'sm:w-7 sm:h-7 md:w-[40px] md:h-[40px] lg:w-[40px] lg:w-[40px]',
+ header: 'sm:w-7 sm:h-7 md:w-[40px] md:h-[40px] lg:w-[40px] lg:h-[40px]',
large: 'w-14 h-14',
full: 'w-full h-full',
+ captain: 'w-20 h-20',
};
return (
-
+
- {editable && (
+ {editable && !isCaptain && (
)}
+ {isCaptain && (
+
+
+
+ )}
);
}
diff --git a/src/types/crew-card.d.ts b/src/types/crew-card.d.ts
index 3a60707f..4f93e28a 100644
--- a/src/types/crew-card.d.ts
+++ b/src/types/crew-card.d.ts
@@ -36,12 +36,20 @@ export interface CrewMember {
id: number;
nickname: string;
profileImageUrl?: string;
- captain?: boolean;
+}
+
+export interface CrewDetailMember {
+ id: number;
+ nickname: string;
+ email: string;
+ profileImageUrl?: string;
+ captain: boolean;
}
export interface CrewDetail {
id: number;
title: string;
+ introduce: string;
mainCategory?: string;
subCategory?: string;
mainLocation: string;
@@ -50,7 +58,7 @@ export interface CrewDetail {
totalCount: number;
imageUrl: string;
totalGatheringCount: number;
- crewMembers: CrewMember[];
+ crewMembers: CrewDetailMember[];
confirmed: boolean;
introduce?: string;
}