-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: update MatchPlayerBlock design * feat: add getTier * feat: 구조 구현 * feat: 디렉터님과 페어프로그래밍 * fix: 가운데 정렬 * feat: 주석 삭제 및 로직 수정 * feat: match 페이지에 적용 * fix: fix tsc error
- Loading branch information
Showing
15 changed files
with
778 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
// import Match from "@/components/pages/club/Match"; | ||
import Match from "@/components/pages/club/Match"; | ||
|
||
function MatchPage() { | ||
return <div>match</div>; | ||
// return <Match />; | ||
return <Match />; | ||
} | ||
|
||
export default MatchPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,34 @@ | ||
import { getTierWithEmoji } from "@/utils/getTierWithEmoji"; | ||
import type { MatchParticipant } from "@/types/matchTypes"; | ||
import { getTierWithEmoji } from "@/utils/getTier"; | ||
import React from "react"; | ||
|
||
export type Player = { | ||
imgUrl: string; | ||
name: string; | ||
tier: "GOLD" | "SILVER" | "BRONZE"; | ||
score: number; | ||
}; | ||
interface MatchPlayerBlockProps extends MatchParticipant {} | ||
|
||
interface PlayerNodeProps extends Player {} | ||
|
||
function PlayerNode({ imgUrl, name, tier, score }: PlayerNodeProps) { | ||
function MatchPlayerBlock({ | ||
image, | ||
name, | ||
tier, | ||
participant_win_set_count, | ||
}: MatchPlayerBlockProps) { | ||
return ( | ||
<div className="flex gap-2 border-gray-300 border"> | ||
<img src={imgUrl} alt="profile" className="w-10 h-10 rounded-full" /> | ||
<span>{name}</span> | ||
<span>{getTierWithEmoji(tier)}</span> | ||
<span>{score}</span> | ||
<div className="flex items-center justify-between gap-3 p-2 rounded-sm bg-gray-700 w-60 h-11"> | ||
<div className="flex items-center gap-3 "> | ||
<img | ||
src={image} | ||
alt="profile" | ||
className="w-8 h-8 rounded-full object-cover border border-gray-500" | ||
/> | ||
<div className="flex-1 flex justify-center items-center gap-2"> | ||
<span className="block text-sm font-semibold text-gray-200 truncate"> | ||
{name} {getTierWithEmoji(tier || "")} | ||
</span> | ||
</div> | ||
</div> | ||
<span className="text-lg font-semibold text-blue-300"> | ||
{participant_win_set_count} | ||
</span> | ||
</div> | ||
); | ||
} | ||
|
||
export default PlayerNode; | ||
export default MatchPlayerBlock; |
Oops, something went wrong.