-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Polynomeer/feature/6/game-view
Feature/6/game view
- Loading branch information
Showing
14 changed files
with
239 additions
and
21 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
3 changes: 2 additions & 1 deletion
3
FE/baseball/src/Components/Game/GamePlayground/GameDisplay/GameDisplay.jsx
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,7 +1,8 @@ | ||
import { GamePlayground as S } from "@/Components/Game/GameStyles"; | ||
|
||
const GameDisplay = () => { | ||
return <S.GameDisplay>GameDisplay</S.GameDisplay>; | ||
// GameDisplay넣어야함 | ||
return <S.GameDisplay></S.GameDisplay>; | ||
}; | ||
|
||
export default GameDisplay; |
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
21 changes: 21 additions & 0 deletions
21
FE/baseball/src/Components/Game/SquadBoard/PopUpButton.jsx
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { SquadBoard as S } from "@/Components/Game/GameStyles"; | ||
|
||
const PopUpButton = ({ handleMouseOver }) => { | ||
return ( | ||
<S.PopUpButton onMouseOver={handleMouseOver}> | ||
<svg | ||
x="0px" | ||
y="0px" | ||
width="15px" | ||
height="15px" | ||
viewBox="0 0 284.929 284.929" | ||
fill="#fff" | ||
> | ||
<path d="M17.128,167.872c1.903,1.902,4.093,2.854,6.567,2.854c2.474,0,4.664-0.952,6.567-2.854L142.466,55.666l112.208,112.206 c1.902,1.902,4.093,2.854,6.563,2.854c2.478,0,4.668-0.952,6.57-2.854l14.274-14.277c1.902-1.902,2.847-4.093,2.847-6.563 c0-2.475-0.951-4.665-2.847-6.567L149.028,7.419c-1.901-1.906-4.088-2.853-6.562-2.853s-4.665,0.95-6.567,2.853L2.856,140.464 C0.95,142.367,0,144.554,0,147.034c0,2.468,0.953,4.658,2.856,6.561L17.128,167.872z" /> | ||
<path d="M149.028,117.055c-1.901-1.906-4.088-2.856-6.562-2.856s-4.665,0.953-6.567,2.856L2.856,250.1 C0.95,252.003,0,254.192,0,256.67c0,2.472,0.953,4.661,2.856,6.564l14.272,14.276c1.903,1.903,4.093,2.848,6.567,2.848 c2.474,0,4.664-0.951,6.567-2.848l112.204-112.209l112.208,112.209c1.902,1.903,4.093,2.852,6.563,2.852 c2.478,0,4.668-0.948,6.57-2.852l14.274-14.276c1.902-1.903,2.847-4.093,2.847-6.564c0-2.478-0.951-4.667-2.847-6.57 L149.028,117.055z" /> | ||
</svg> | ||
</S.PopUpButton> | ||
); | ||
}; | ||
|
||
export default PopUpButton; |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { useState } from "react"; | ||
import PopUpButton from "./PopUpButton"; | ||
import SquadTable from "./SquadTable/SquadTable"; | ||
import { SquadBoard as S } from "@/Components/Game/GameStyles"; | ||
|
||
const SquadBoard = () => { | ||
const [mouseOverFlag, setMouseOverFlag] = useState(false); | ||
|
||
const handleMouseOver = ({ target: { tagName } }) => { | ||
if (tagName === "path" || tagName === "svg") return; | ||
setMouseOverFlag((prev) => !prev); | ||
}; | ||
|
||
return ( | ||
<> | ||
<S.SquadBoardWrapper> | ||
<S.PopUpBackground | ||
isMouseOver={mouseOverFlag} | ||
onMouseOver={handleMouseOver} | ||
/> | ||
<PopUpButton handleMouseOver={handleMouseOver} /> | ||
<S.SquadBoard isMouseOver={mouseOverFlag}> | ||
<SquadTable /> | ||
<SquadTable /> | ||
</S.SquadBoard> | ||
</S.SquadBoardWrapper> | ||
</> | ||
); | ||
}; | ||
|
||
export default SquadBoard; |
14 changes: 14 additions & 0 deletions
14
FE/baseball/src/Components/Game/SquadBoard/SquadTable/SquadTable.jsx
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import SquadTableHeader from "./SquadTableHeader"; | ||
import SquadTableBody from "./SquadTableBody"; | ||
import { SquadBoard as S } from "@/Components/Game/GameStyles"; | ||
|
||
const SquadTable = () => { | ||
return ( | ||
<S.SquadTable.SquadTable> | ||
<SquadTableHeader teamName={"TEAM - ILLY"} /> | ||
<SquadTableBody /> | ||
</S.SquadTable.SquadTable> | ||
); | ||
}; | ||
|
||
export default SquadTable; |
38 changes: 38 additions & 0 deletions
38
FE/baseball/src/Components/Game/SquadBoard/SquadTable/SquadTableBody.jsx
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import SquadTableRow from "./SquadTableRow"; | ||
import { SquadBoard as S } from "@/Components/Game/GameStyles"; | ||
|
||
const SquadTableBody = ({ playerInfo }) => { | ||
const rowHeaderDefault = { | ||
타자: "타자", | ||
타석: "타석", | ||
안타: "안타", | ||
아웃: "아웃", | ||
평균: "평균", | ||
}; | ||
const mockRow = { | ||
타자: "스윙", | ||
타석: "1", | ||
안타: "2", | ||
아웃: "2", | ||
평균: "1.000", | ||
}; | ||
return ( | ||
<S.SquadTable.SquadTableBody> | ||
<tbody> | ||
<SquadTableRow row={rowHeaderDefault} /> | ||
<SquadTableRow row={mockRow} /> | ||
<SquadTableRow row={mockRow} /> | ||
<SquadTableRow row={mockRow} /> | ||
<SquadTableRow row={mockRow} /> | ||
<SquadTableRow row={mockRow} /> | ||
<SquadTableRow row={mockRow} /> | ||
<SquadTableRow row={mockRow} /> | ||
<SquadTableRow row={mockRow} /> | ||
<SquadTableRow row={mockRow} /> | ||
<SquadTableRow row={mockRow} /> | ||
</tbody> | ||
</S.SquadTable.SquadTableBody> | ||
); | ||
}; | ||
|
||
export default SquadTableBody; |
Empty file.
7 changes: 7 additions & 0 deletions
7
FE/baseball/src/Components/Game/SquadBoard/SquadTable/SquadTableData.jsx
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { SquadBoard as S } from "@/Components/Game/GameStyles"; | ||
|
||
const SquadTableData = ({ data }) => { | ||
return <S.SquadTable.SquadTableData>{data}</S.SquadTable.SquadTableData>; | ||
}; | ||
|
||
export default SquadTableData; |
9 changes: 9 additions & 0 deletions
9
FE/baseball/src/Components/Game/SquadBoard/SquadTable/SquadTableHeader.jsx
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { SquadBoard as S } from "@/Components/Game/GameStyles"; | ||
|
||
const SquadTableHeader = ({ teamName }) => { | ||
return ( | ||
<S.SquadTable.SquadTableHeader>{teamName}</S.SquadTable.SquadTableHeader> | ||
); | ||
}; | ||
|
||
export default SquadTableHeader; |
Empty file.
Empty file.
16 changes: 16 additions & 0 deletions
16
FE/baseball/src/Components/Game/SquadBoard/SquadTable/SquadTableRow.jsx
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import SquadTableData from "./SquadTableData"; | ||
import { SquadBoard as S } from "@/Components/Game/GameStyles"; | ||
|
||
const SquadTableRow = ({ row }) => { | ||
return row ? ( | ||
<S.SquadTable.SquadTableRow> | ||
<SquadTableData data={row.타자} /> | ||
<SquadTableData data={row.타석} /> | ||
<SquadTableData data={row.안타} /> | ||
<SquadTableData data={row.아웃} /> | ||
<SquadTableData data={row.평균} /> | ||
</S.SquadTable.SquadTableRow> | ||
) : null; | ||
}; | ||
|
||
export default SquadTableRow; |
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