Skip to content

Commit

Permalink
Feature/#106 study card props 오류 (#107)
Browse files Browse the repository at this point in the history
* fix : StudyCard Props 수정

#106

* fix : teamMember mocks id 안겹치게 수정

#106
  • Loading branch information
jasper200207 authored Feb 24, 2024
1 parent 9840ac4 commit dba6225
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/app/team/[teamId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ const Page = () => {
{studyCardData.map((study) => {
return (
<StudyCard
key={study.name}
key={study.id}
id={study.id}
name={study.name}
description={study.description}
startDate={study.startDate}
endDate={study.endDate}
status={study.status}
isDeleted={study.isDeleted}
cropId={study.cropId}
teamId={study.teamId}
percent={study.percent}
rank={study.rank}
/>
Expand Down
1 change: 1 addition & 0 deletions src/components/StudyCard/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export interface StudyCardProps {
cropId: number;
teamId: number;
percent: number;
rank: number;
}
4 changes: 4 additions & 0 deletions src/mocks/studyCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const studyCardData: StudyCardProps[] = [
cropId: 1,
teamId: 1,
percent: 80,
rank: 1,
},
{
id: 2,
Expand All @@ -24,6 +25,7 @@ const studyCardData: StudyCardProps[] = [
cropId: 2,
teamId: 2,
percent: 40,
rank: 2,
},
{
id: 3,
Expand All @@ -36,6 +38,7 @@ const studyCardData: StudyCardProps[] = [
cropId: 3,
teamId: 3,
percent: 50,
rank: 3,
},
{
id: 4,
Expand All @@ -48,6 +51,7 @@ const studyCardData: StudyCardProps[] = [
cropId: 4,
teamId: 4,
percent: 50,
rank: 4,
},
];

Expand Down
2 changes: 1 addition & 1 deletion src/mocks/teamMember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const teamMemberList: TeamMemberProps[] = [
},
{
name: '두레3',
googleId: '4',
googleId: '3',
email: 'email.com',
imageUrl: '',
isDeleted: false,
Expand Down

0 comments on commit dba6225

Please sign in to comment.