diff --git a/README.md b/README.md index 30ed1482..e6b082f2 100644 --- a/README.md +++ b/README.md @@ -68,3 +68,13 @@ | ![팀원6 사진](https://via.placeholder.com/100) | 최수형 | Front | | ![팀원7 사진](https://via.placeholder.com/100) | 이우현 | Back | | ![팀원8 사진](https://via.placeholder.com/100) | 이정우 | Back | + + \ No newline at end of file diff --git a/src/components/common/crew-list/crew-card-list.tsx b/src/components/common/crew-list/crew-card-list.tsx index e9bce663..cc35e0d1 100644 --- a/src/components/common/crew-list/crew-card-list.tsx +++ b/src/components/common/crew-list/crew-card-list.tsx @@ -14,6 +14,8 @@ interface CrewCardListProps { inWhere?: 'my-crew' | 'main-crew'; } +// TODO: 페이지 전체에서 inWhere 가 my-crew 인지 main-crew 인지 체크하는 부분이 반복되는데 이를 줄일 수 있는 방법이 없을까요? + export default function CrewCardList({ data, inWhere }: CrewCardListProps) { const crewDataList = inWhere === 'my-crew' diff --git a/src/components/common/crew-list/crew-card.tsx b/src/components/common/crew-list/crew-card.tsx index 0ff603a8..2eb8190f 100644 --- a/src/components/common/crew-list/crew-card.tsx +++ b/src/components/common/crew-list/crew-card.tsx @@ -27,6 +27,8 @@ export default function CrewCard({ inWhere, }: CrewCardProps) { const [prefetchedPages, setPrefetchedPages] = useState(new Set()); + // TODO: path 파일을 하나 만들어서 한곳에서 관리 하면 좋을 것 같습니다. + // ex) import { CREWPAGE } from '@/src/constants/path'; 해서 사용할 수 있게 const CREWPAGE = `/crew/detail/${id}`; const router = useRouter(); diff --git a/src/components/common/gathering-card/gathering-card.stories.tsx b/src/components/common/gathering-card/gathering-card.stories.tsx index 5c557620..9afb1898 100644 --- a/src/components/common/gathering-card/gathering-card.stories.tsx +++ b/src/components/common/gathering-card/gathering-card.stories.tsx @@ -17,6 +17,7 @@ const meta: Meta = { }, backgrounds: { default: 'light-gray', + // TODO: #F9FAFB 색상이 지금은 static으로 작성되어 있는데(여기 말고도 몇군데가 더 있습니다.) tailwind theme 50 컬러를 가져와서 사용할 수 없을까요? values: [{ name: 'light-gray', value: '#F9FAFB' }], }, }, diff --git a/src/components/common/modal/confirm-cancel-modal.tsx b/src/components/common/modal/confirm-cancel-modal.tsx index db30bfb5..a60a4611 100644 --- a/src/components/common/modal/confirm-cancel-modal.tsx +++ b/src/components/common/modal/confirm-cancel-modal.tsx @@ -2,6 +2,11 @@ import { ReactNode } from 'react'; import { Modal } from '@mantine/core'; import Button from '@/src/components/common/button'; +// TODO: ConfirmModalProps과 ConfirmCancelModalProps이 겹치는 부분이 많은데 extends 해서 사용할 수 있을 것 같습니다. +// interface ConfirmCancelModalProps extends ConfirmModalProps { +// onCancel?: () => void; +// } + interface ConfirmCancelModalProps { children: ReactNode; opened: boolean; diff --git a/src/components/common/profile/index.tsx b/src/components/common/profile/index.tsx index 5722d171..9efb2b16 100644 --- a/src/components/common/profile/index.tsx +++ b/src/components/common/profile/index.tsx @@ -40,6 +40,8 @@ export function Profile({ } else if (isCaptain) { finalSize = 'large'; } + + // 이런 것들은 component 내부에서 정의하는 것이 아니라, 외부에 정의하는 게 좋습니다. const sizeClasses = { small: 'w-6 h-6', header: 'sm:w-7 sm:h-7 md:w-[40px] md:h-[40px] lg:w-[40px] lg:h-[40px]', diff --git a/src/components/common/skeleton/reviewable-gathering-skeleton-list/index.tsx b/src/components/common/skeleton/reviewable-gathering-skeleton-list/index.tsx index e05b991e..c530b3a2 100644 --- a/src/components/common/skeleton/reviewable-gathering-skeleton-list/index.tsx +++ b/src/components/common/skeleton/reviewable-gathering-skeleton-list/index.tsx @@ -16,3 +16,10 @@ export default function ReviewableGatheringSkeletonList({ ); } + +// TODO: `{[...Array(num)].map((_, index) => ())}` 형태가 아래 파일에서 반복되는 데 이 부분을 추상화 할 수는 없을까요? +// src/components/common/skeleton/crew-skeleton-list/index.tsx +// src/components/common/skeleton/gathering-skeleton-list/index.tsx +// src/components/common/skeleton/my-gathering-skeleton-list/index.tsx +// src/components/common/skeleton/my-review-skeleton-list/index.tsx +// src/components/common/skeleton/reviewable-gathering-skeleton-list/index.tsx diff --git a/src/types/create-crew.d.ts b/src/types/create-crew.d.ts index 478a0ea1..99cc90ec 100644 --- a/src/types/create-crew.d.ts +++ b/src/types/create-crew.d.ts @@ -1,12 +1,25 @@ // NOTE : imageURL 임시로 File로 지정 + +// TODO: CreateCrewFormTypes, CreateCrewRequestTypes의 타입에 중복 코드가 많은데 extends를 사용해서 중복을 제거할 수 있을 것 같습니다. +// export interface CreateCrewFormTypes extends Omit { +// imageUrl: File | string | null; +// subCategory: string | null; +// subLocation: string | null; +// } +// TODO: 이 페이지 뿐 아니라 types/*.ts 파일 전반적으로 Omit 유틸리티 타입, extends를 사용하면 중복 코드를 제거할 수 있습니다. + export interface CreateCrewFormTypes { title: string; mainCategory: string; + // TODO: subCategory가 `subCategory?: string`(옵셔널)이 아니라 `subCategory: string | null`로 지정된 이유가 있을까요? + // 다른 개발자가 보면 헷갈릴 수 있을 것 같습니다. subCategory: string | null; mainLocation: string; subLocation: string | null; totalCount: number; introduce: string; + // NOTE: imageUrl의 타입이 CreateCrewRequestTypes와 다른데 이유가 있을까요? + // 이 부분도 처음 보는 사람은 헷갈릴 것 같아서 주석 등으로 설명을 추가하면 좋을 것 같습니다. imageUrl: File | string | null; }