Skip to content

Commit

Permalink
fix: Add characteristics to the user card
Browse files Browse the repository at this point in the history
  • Loading branch information
cjeongmin committed May 29, 2024
1 parent e9a6aaa commit 7023a82
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/app/pages/main-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,17 @@ export function MainPage() {
nickname,
location,
profileImageUrl,
options,
}) => (
<Link href={`/profile/${memberId}`} key={memberId}>
<UserCard
name={nickname}
percentage={score}
profileImage={profileImageUrl}
location={location}
smoking={options.smoking}
roomSharingOption={options.roomSharingOption}
mateAge={options.mateAge}
hideScore={false}
/>
</Link>
Expand Down
12 changes: 11 additions & 1 deletion src/components/main-page/UserCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,18 @@ export function UserCard({
location,
percentage,
profileImage,
smoking,
roomSharingOption,
mateAge,
hideScore,
}: {
name: string;
location: string;
percentage: number;
profileImage: string;
smoking: string;
roomSharingOption: string;
mateAge: number;
hideScore?: boolean;
}) {
const isMobile = useIsMobile();
Expand All @@ -126,7 +132,11 @@ export function UserCard({
<p>{location}</p>
</div>
</styles.profileInfo>
<styles.data />
<styles.data>
<p className="selected">흡연 여부: {smoking}</p>
<p className="selected">룸메이트 방 공유: {roomSharingOption}</p>
<p className="selected">나이 차이: {mateAge}</p>
</styles.data>
</styles.container>
);
}

0 comments on commit 7023a82

Please sign in to comment.