Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/_apis/crew/my-crew-hosted-list.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { fetchApi } from '@/src/utils/api';
import { MyCrewListResponse, PageableTypes } from '@/src/types/crew-card';

export async function getMyCrewHostedList(pageable: PageableTypes) {
const { page, size, sort = ['string'] } = pageable;

const response: { data: MyCrewListResponse } = await fetchApi(
`/api/crews/hosted?page=${page}&size=${size}&sort=${sort}`,
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include', // 인증 정보를 요청에 포함
},
);
return response.data;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

에러 처리 로직 추가 필요

API 호출 실패 시 적절한 에러 처리가 없습니다. 네트워크 오류나 서버 오류에 대한 처리를 추가하는 것이 좋겠습니다.

다음과 같이 에러 처리를 추가하는 것을 제안드립니다:

 export async function getMyCrewHostedList(pageable: PageableTypes) {
   const { page, size, sort = ['string'] } = pageable;

-  const response: { data: MyCrewListResponse } = await fetchApi(
-    `/api/crews/hosted?page=${page}&size=${size}&sort=${sort}`,
-    {
-      method: 'GET',
-      headers: {
-        'Content-Type': 'application/json',
-      },
-      credentials: 'include', // 인증 정보를 요청에 포함
-    },
-  );
-  return response.data;
+  try {
+    const response: { data: MyCrewListResponse } = await fetchApi(
+      `/api/crews/hosted?page=${page}&size=${size}&sort=${sort}`,
+      {
+        method: 'GET',
+        headers: {
+          'Content-Type': 'application/json',
+        },
+        credentials: 'include',
+      },
+    );
+    return response.data;
+  } catch (error) {
+    if (error instanceof Error) {
+      throw new Error(`내가 주최한 크루 목록을 가져오는데 실패했습니다: ${error.message}`);
+    }
+    throw error;
+  }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const response: { data: MyCrewListResponse } = await fetchApi(
`/api/crews/hosted?page=${page}&size=${size}&sort=${sort}`,
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include', // 인증 정보를 요청에 포함
},
);
return response.data;
}
export async function getMyCrewHostedList(pageable: PageableTypes) {
const { page, size, sort = ['string'] } = pageable;
try {
const response: { data: MyCrewListResponse } = await fetchApi(
`/api/crews/hosted?page=${page}&size=${size}&sort=${sort}`,
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include',
},
);
return response.data;
} catch (error) {
if (error instanceof Error) {
throw new Error(`내가 주최한 크루 목록을 가져오는데 실패했습니다: ${error.message}`);
}
throw error;
}
}

18 changes: 18 additions & 0 deletions src/_apis/crew/my-crew-joined-list.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { fetchApi } from '@/src/utils/api';
import { MyCrewListResponse, PageableTypes } from '@/src/types/crew-card';

export async function getMyCrewJoinedList(pageable: PageableTypes) {
const { page, size, sort = ['string'] } = pageable;

const response: { data: MyCrewListResponse } = await fetchApi(
`/api/crews/joined?page=${page}&size=${size}&sort=${sort}`,
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include', // 인증 정보를 요청에 포함
},
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

API 응답에 대한 런타임 타입 검증이 필요합니다

현재 MyCrewListResponse 타입은 TypeScript 인터페이스로만 정의되어 있어, 런타임에서 실제 API 응답이 예상된 형식과 일치하는지 확인할 수 없습니다. 다음과 같은 개선이 필요합니다:

  • zod 또는 유사한 런타임 타입 검증 라이브러리를 사용하여 API 응답 스키마를 정의하고 검증
  • src/utils/api.tsfetchApi 함수에서 응답 데이터 검증 로직 추가
  • MyCrewListResponse 타입에 대한 검증 스키마 구현

예시 코드:

import { z } from 'zod';

const MyCrewListSchema = z.object({
  content: z.array(MyCrewSchema),
  hasNext: z.boolean()
});

// fetchApi 호출 후 데이터 검증
const validatedData = MyCrewListSchema.parse(response.data);
🔗 Analysis chain

API 응답 타입 검증이 필요합니다.

API 응답의 타입 안전성을 보장하기 위해 런타임 타입 검증을 추가하는 것이 좋습니다.


Let's check the actual type definition and its usage to verify runtime type checking.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if MyCrewListResponse type is properly defined and used consistently

# Search for MyCrewListResponse type definition and usage
echo "Searching for type definition..."
rg "type MyCrewListResponse" -A 5

echo "Searching for type usage..."
rg "MyCrewListResponse"

Length of output: 1367


Script:

#!/bin/bash
# Check the MyCrewListResponse type definition and any runtime type validation
echo "Checking MyCrewListResponse type definition:"
rg -A 10 "interface MyCrewListResponse" src/types/crew-card.d.ts

echo "\nChecking for any runtime type validation (e.g., zod, io-ts):"
rg -l "zod|io-ts|runtypes|ajv|class-validator" 

echo "\nChecking fetchApi implementation for any type validation:"
rg -A 10 "function fetchApi" 

Length of output: 1523

return response.data;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

에러 처리와 코드 일관성 개선이 필요합니다.

다음과 같은 개선사항들을 제안드립니다:

  1. API 호출 실패 시 에러 처리 로직 추가
  2. 영어로 된 코드베이스 일관성을 위해 한글 주석을 영어로 변경
  3. 페이지네이션 파라미터 유효성 검사 추가

다음과 같이 수정해보시는 건 어떨까요?:

 export async function getMyCrewJoinedList(pageable: PageableTypes) {
   const { page, size, sort = ['string'] } = pageable;
+
+  if (page < 0 || size <= 0) {
+    throw new Error('Invalid pagination parameters');
+  }
 
-  const response: { data: MyCrewListResponse } = await fetchApi(
-    `/api/crews/joined?page=${page}&size=${size}&sort=${sort}`,
-    {
-      method: 'GET',
-      headers: {
-        'Content-Type': 'application/json',
-      },
-      credentials: 'include', // 인증 정보를 요청에 포함
-    },
-  );
-  return response.data;
+  try {
+    const response: { data: MyCrewListResponse } = await fetchApi(
+      `/api/crews/joined?page=${page}&size=${size}&sort=${sort}`,
+      {
+        method: 'GET',
+        headers: {
+          'Content-Type': 'application/json',
+        },
+        credentials: 'include', // Include authentication information
+      },
+    );
+    return response.data;
+  } catch (error) {
+    throw new Error(`Failed to fetch joined crew list: ${error.message}`);
+  }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export async function getMyCrewJoinedList(pageable: PageableTypes) {
const { page, size, sort = ['string'] } = pageable;
const response: { data: MyCrewListResponse } = await fetchApi(
`/api/crews/joined?page=${page}&size=${size}&sort=${sort}`,
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include', // 인증 정보를 요청에 포함
},
);
return response.data;
}
export async function getMyCrewJoinedList(pageable: PageableTypes) {
const { page, size, sort = ['string'] } = pageable;
if (page < 0 || size <= 0) {
throw new Error('Invalid pagination parameters');
}
try {
const response: { data: MyCrewListResponse } = await fetchApi(
`/api/crews/joined?page=${page}&size=${size}&sort=${sort}`,
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include', // Include authentication information
},
);
return response.data;
} catch (error) {
throw new Error(`Failed to fetch joined crew list: ${error.message}`);
}
}

4 changes: 2 additions & 2 deletions src/_queries/crew/crew-list-queries.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getCrewList } from '@/src/_apis/crew/crew-list';
import { ConditionTypes, MainCrewListResponse, PageableTypes } from '@/src/types/crew-card';
import { getCrewList } from '../../_apis/crew/crew-list';

export function useGetCrewListQuery(condition: ConditionTypes) {
return {
Expand All @@ -14,7 +14,7 @@ export function useGetCrewListQuery(condition: ConditionTypes) {
getCrewList(condition, { page: pageParam, size: 6, sort: [condition.sortType] }).then(
(response) => {
if (response === undefined) {
throw new Error('Response is null');
throw new Error('Response is undefined');
}
return response;
},
Expand Down
17 changes: 17 additions & 0 deletions src/_queries/crew/my-crew-hosted-list-query.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { getMyCrewHostedList } from '@/src/_apis/crew/my-crew-hosted-list';
import { MyCrewListResponse } from '@/src/types/crew-card';

export function useGetMyCrewHostedQuery() {
return {
queryKey: ['my-crew-creation'],
queryFn: ({ pageParam = 0 }) =>
getMyCrewHostedList({ page: pageParam, size: 6, sort: ['string'] }).then((response) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

정렬 매개변수 하드코딩 문제

sort: ['string']은 올바른 정렬 매개변수가 아닌 것으로 보입니다. 정렬 기준을 명확하게 지정해주시거나, API 요구사항에 맞는 적절한 값으로 변경해주세요.

예시 수정안:

-sort: ['string']
+sort: ['createdAt,desc']  // 또는 API 요구사항에 맞는 다른 정렬 기준

Committable suggestion skipped: line range outside the PR's diff.

if (response === undefined) {
throw new Error('Response is undefined');
}
return response;
}),
getNextPageParam: (lastPage: MyCrewListResponse, allPages: MyCrewListResponse[]) =>
lastPage.hasNext ? allPages.length : undefined,
};
}
17 changes: 17 additions & 0 deletions src/_queries/crew/my-crew-joined-list-query.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { getMyCrewJoinedList } from '@/src/_apis/crew/my-crew-joined-list';
import { MyCrewListResponse } from '@/src/types/crew-card';

export function useGetMyCrewJoinedQuery() {
return {
queryKey: ['my-crew-participation'],
queryFn: ({ pageParam = 0 }) =>
getMyCrewJoinedList({ page: pageParam, size: 6, sort: ['string'] }).then((response) => {
if (response === undefined) {
throw new Error('Response is undefined');
}
return response;
}),
getNextPageParam: (lastPage: MyCrewListResponse, allPages: MyCrewListResponse[]) =>
lastPage.hasNext ? allPages.length : undefined,
};
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

쿼리 구성에 대한 개선 제안

현재 구현에서 다음과 같은 개선이 필요해 보입니다:

  1. 정렬 파라미터가 ['string']으로 하드코딩되어 있습니다.
  2. 페이지 크기(size)가 고정값 6으로 설정되어 있어 유연성이 떨어집니다.
  3. 에러 처리가 너무 일반적입니다.

다음과 같이 개선하는 것을 제안드립니다:

-export function useGetMyCrewJoinedQuery() {
+export function useGetMyCrewJoinedQuery({
+  pageSize = 6,
+  sortOption = ['createdAt,desc']
+}: {
+  pageSize?: number;
+  sortOption?: string[];
+} = {}) {
   return {
-    queryKey: ['my-crew-participation'],
+    queryKey: ['my-crew-participation', pageSize, sortOption],
     queryFn: ({ pageParam = 0 }) =>
-      getMyCrewJoinedList({ page: pageParam, size: 6, sort: ['string'] }).then((response) => {
+      getMyCrewJoinedList({ page: pageParam, size: pageSize, sort: sortOption }).then((response) => {
         if (response === undefined) {
-          throw new Error('Response is undefined');
+          throw new Error('크루 목록을 가져오는데 실패했습니다.');
         }
         return response;
       }),
     getNextPageParam: (lastPage: MyCrewListResponse, allPages: MyCrewListResponse[]) =>
       lastPage.hasNext ? allPages.length : undefined,
   };
 }

이렇게 수정하면:

  1. 페이지 크기와 정렬 옵션을 외부에서 설정할 수 있습니다.
  2. 쿼리 키가 설정값을 포함하여 더 정확한 캐시 관리가 가능합니다.
  3. 에러 메시지가 더 구체적으로 제공됩니다.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export function useGetMyCrewJoinedQuery() {
return {
queryKey: ['my-crew-participation'],
queryFn: ({ pageParam = 0 }) =>
getMyCrewJoinedList({ page: pageParam, size: 6, sort: ['string'] }).then((response) => {
if (response === undefined) {
throw new Error('Response is undefined');
}
return response;
}),
getNextPageParam: (lastPage: MyCrewListResponse, allPages: MyCrewListResponse[]) =>
lastPage.hasNext ? allPages.length : undefined,
};
}
export function useGetMyCrewJoinedQuery({
pageSize = 6,
sortOption = ['createdAt,desc']
}: {
pageSize?: number;
sortOption?: string[];
} = {}) {
return {
queryKey: ['my-crew-participation', pageSize, sortOption],
queryFn: ({ pageParam = 0 }) =>
getMyCrewJoinedList({ page: pageParam, size: pageSize, sort: sortOption }).then((response) => {
if (response === undefined) {
throw new Error('크루 목록을 가져오는데 실패했습니다.');
}
return response;
}),
getNextPageParam: (lastPage: MyCrewListResponse, allPages: MyCrewListResponse[]) =>
lastPage.hasNext ? allPages.length : undefined,
};
}

19 changes: 19 additions & 0 deletions src/app/(crew)/my-crew/hosted/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use client';

import { useGetMyCrewHostedQuery } from '@/src/_queries/crew/my-crew-hosted-list-query';
import { useInfiniteScroll } from '@/src/hooks/use-infinite-scroll';
import CrewCardList from '@/src/components/common/crew-list/crew-card-list';

export default function MyCrewParticipationPage() {
const { data, ref, isFetchingNextPage } = useInfiniteScroll(useGetMyCrewHostedQuery());
return (
<div>
<CrewCardList
inWhere="my-crew"
data={data ?? { pages: [], pageParams: [] }}
ref={ref}
isFetchingNextPage={isFetchingNextPage}
/>
</div>
);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

에러 처리와 로딩 상태 관리가 필요합니다.

다음 사항들을 개선하면 좋을 것 같습니다:

  1. 쿼리 실패 시 에러 처리
  2. 초기 로딩 상태 표시
  3. 데이터 타입 안전성 강화

다음과 같이 개선해보시는 건 어떨까요?

 export default function MyCrewParticipationPage() {
-  const { data, ref, isFetchingNextPage } = useInfiniteScroll(useGetMyCrewHostedQuery());
+  const { 
+    data, 
+    ref, 
+    isFetchingNextPage, 
+    isError, 
+    error, 
+    isLoading 
+  } = useInfiniteScroll(useGetMyCrewHostedQuery());
+
+  if (isLoading) {
+    return <div>로딩 중...</div>;
+  }
+
+  if (isError) {
+    return <div>에러가 발생했습니다: {error?.message}</div>;
+  }

   return (
     <div>
       <CrewCardList
         inWhere="my-crew"
         data={data ?? { pages: [], pageParams: [] }}
         ref={ref}
         isFetchingNextPage={isFetchingNextPage}
       />
     </div>
   );
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export default function MyCrewParticipationPage() {
const { data, ref, isFetchingNextPage } = useInfiniteScroll(useGetMyCrewHostedQuery());
return (
<div>
<CrewCardList
inWhere="my-crew"
data={data ?? { pages: [], pageParams: [] }}
ref={ref}
isFetchingNextPage={isFetchingNextPage}
/>
</div>
);
}
export default function MyCrewParticipationPage() {
const {
data,
ref,
isFetchingNextPage,
isError,
error,
isLoading
} = useInfiniteScroll(useGetMyCrewHostedQuery());
if (isLoading) {
return <div>로딩 중...</div>;
}
if (isError) {
return <div>에러가 발생했습니다: {error?.message}</div>;
}
return (
<div>
<CrewCardList
inWhere="my-crew"
data={data ?? { pages: [], pageParams: [] }}
ref={ref}
isFetchingNextPage={isFetchingNextPage}
/>
</div>
);
}

19 changes: 19 additions & 0 deletions src/app/(crew)/my-crew/joined/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use client';

import { useGetMyCrewJoinedQuery } from '@/src/_queries/crew/my-crew-joined-list-query';
import { useInfiniteScroll } from '@/src/hooks/use-infinite-scroll';
import CrewCardList from '@/src/components/common/crew-list/crew-card-list';

export default function MyCrewParticipationPage() {
const { data, ref, isFetchingNextPage } = useInfiniteScroll(useGetMyCrewJoinedQuery());
return (
<div>
<CrewCardList
inWhere="my-crew"
data={data ?? { pages: [], pageParams: [] }}
ref={ref}
isFetchingNextPage={isFetchingNextPage}
/>
</div>
);
}
41 changes: 41 additions & 0 deletions src/app/(crew)/my-crew/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
'use client';

import { ReactNode, useEffect, useState } from 'react';
import { usePathname, useRouter } from 'next/navigation';
import Tabs from '@/src/components/common/tab';

export default function MyCrewLayout({ children }: { children: ReactNode }) {
const router = useRouter();
const currentPath = usePathname();
const myCrewTabs = [
{ label: '내가 참여한 크루', id: 'joined-crew', route: '/my-crew/joined' },
{ label: '내가 만든 크루', id: 'hosted-crew', route: '/my-crew/hosted' },
];
const [currentTab, setCurrentTab] = useState(myCrewTabs[0].id);

const handleTabClick = (id: string) => {
const targetRoute = myCrewTabs.find((tab) => tab.id === id)?.route;
if (targetRoute) router.push(targetRoute);
};
Comment on lines +16 to +19
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

에러 처리 개선이 필요합니다

targetRoute가 없는 경우에 대한 처리가 누락되어 있습니다. 사용자에게 적절한 피드백을 제공하는 것이 좋습니다.

다음과 같이 수정해보세요:

 const handleTabClick = (id: string) => {
   const targetRoute = myCrewTabs.find((tab) => tab.id === id)?.route;
-  if (targetRoute) router.push(targetRoute);
+  if (targetRoute) {
+    router.push(targetRoute);
+  } else {
+    console.error(`탭 ID ${id}에 해당하는 경로를 찾을 수 없습니다.`);
+    // TODO: 사용자에게 에러 메시지 표시
+  }
 };

Committable suggestion skipped: line range outside the PR's diff.


useEffect(() => {
const activeTabId = myCrewTabs.find((tab) => tab.route === currentPath)?.id;
if (activeTabId) setCurrentTab(activeTabId);
}, [currentPath]);

return (
<div className="py-8 md:py-12.5">
<div className="px-3 md:px-8 lg:px-11.5">
<Tabs
variant="default"
tabs={myCrewTabs}
activeTab={currentTab}
onTabClick={(id) => {
handleTabClick(id);
}}
/>
</div>
<div className="mt-8 px-3 md:px-8 lg:px-11.5">{children}</div>
</div>
);
}
37 changes: 2 additions & 35 deletions src/app/(crew)/my-crew/page.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,7 @@
'use client';

import { useState } from 'react';
import Tabs from '@/src/components/common/tab';
import { redirect } from 'next/navigation';

export default function MyCrewPage() {
const myPageTabs = [
{ label: '내가 참여한 크루', id: 'joined-crew' },
{ label: '내가 만든 크루', id: 'made-crew' },
];
const [currentTab, setCurrentTab] = useState(myPageTabs[0].id);

// TODO: fetchCrewData 함수를 사용하여 데이터를 불러오기 : 파라미터 수정 필요
// TODO: 리스트와는 다른 데이터를 사용해야해서 우선 주석처리 했습니다.
// const { data, ref, isFetchingNextPage } =
// useInfiniteScroll<MyCrewListResponse>(useGetCrewListQuery());

return (
<div className="py-8 md:py-12.5">
<div className="px-3 md:px-8 lg:px-11.5">
<Tabs
variant="default"
tabs={myPageTabs}
activeTab={currentTab}
onTabClick={(id) => {
setCurrentTab(id);
}}
/>
</div>
<div className="mt-8 px-3 md:px-8 lg:px-11.5">
{/* <CrewCardList
inWhere="my-crew"
data={data}
ref={ref}
isFetchingNextPage={isFetchingNextPage}
/> */}
</div>
</div>
);
redirect('/my-crew/joined');
}
20 changes: 6 additions & 14 deletions src/components/common/crew-list/crew-card-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,21 @@ import {
import CrewCard from './crew-card';

// CrewCardListProps 타입을 구분하여 정의
interface MainCrewCardListProps {
data: InfiniteData<MainCrewListResponse>;
interface CrewCardListProps {
data: InfiniteData<MainCrewListResponse | MyCrewListResponse>;
isFetchingNextPage: boolean;
inWhere?: undefined;
inWhere?: 'my-crew' | 'main-crew';
}

interface MyCrewCardListProps {
data: InfiniteData<MyCrewListResponse>;
isFetchingNextPage: boolean;
inWhere: 'my-crew';
}

// 유니온 타입으로 정의
type CrewCardListProps = MainCrewCardListProps | MyCrewCardListProps;

function CrewCardList(
{ data, isFetchingNextPage, inWhere }: CrewCardListProps,
ref: React.Ref<HTMLDivElement>,
) {
const crewDataList =
(inWhere === 'my-crew'
? data?.pages.flatMap((page) => page?.content)
: data?.pages?.flatMap((page) => page?.content)) ?? [];
? data?.pages.flatMap((page) => page?.content as MyCrewList[])
: data?.pages?.flatMap((page) => page?.content as MainCrewList[])) ?? [];

const gridColsStyle = inWhere === 'my-crew' ? '' : 'lg:grid-cols-2';

if (data?.pages[0] === undefined)
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/crew-list/crew-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import IcoUser from '@/public/assets/icons/ic-user.svg';
import Profiles from './profiles';

interface CrewCardProps extends MainCrewList {
inWhere?: 'my-crew';
inWhere?: 'my-crew' | 'main-crew';
}

export default function CrewCard({
Expand Down