Skip to content

Commit

Permalink
Merge pull request #24 from Polynomeer/fix/19/squadboard
Browse files Browse the repository at this point in the history
fix: Fix squadboard popup (#19)
Resolove #24
juddroid authored May 7, 2021
2 parents e28e505 + b2cd5a4 commit 7bfd61a
Showing 5 changed files with 38 additions and 18 deletions.
9 changes: 9 additions & 0 deletions FE/baseball/.firebase/hosting.YnVpbGQ.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
asset-manifest.json,1620363752161,2043f5943394c285d3fe993c82a02fa6033bbc52173d7d31920f4ceaeb7def5c
index.html,1620363752161,ef5f4123179e2315dfe379f6d3a01b500eea607437fa13dc7c9dc5bb727be2af
static/js/2.390a8b7d.chunk.js.LICENSE.txt,1620363752163,bfbf3a4b9e414262e302b9c850733cb7cfafa9577cb62b814d04300a511215fc
static/js/runtime-main.8ce5e419.js,1620363752163,798213e312e2c64d125f9dc9390e3c4e343a1b0e138dd357de3df7c667ff3178
static/js/main.fe7d7855.chunk.js,1620363752163,cb3fb8c25296650b8265361811282ceaa36f6d3c130b70bcb56812dec333ca4c
static/js/runtime-main.8ce5e419.js.map,1620363752163,4da9ed8a4da600a86f0f34982c1a174891b960305fdd54ed3c3b9815bb40148b
static/js/main.fe7d7855.chunk.js.map,1620363752163,5c92c98b7007bd9684049f28ac461c48e274ede43b322fea3cf987cbb28cda3a
static/js/2.390a8b7d.chunk.js,1620363752162,ae4657699f604382a815cd59d035a958bfe22b0e467713af6e45b657f1dab1ed
static/js/2.390a8b7d.chunk.js.map,1620363752163,fc09628225b6821ef67f9bcee3adcec5cd397a34eee7f05b9ef95244c1ea6c0d
5 changes: 5 additions & 0 deletions FE/baseball/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "teamilly-baseball"
}
}
10 changes: 10 additions & 0 deletions FE/baseball/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
1 change: 1 addition & 0 deletions FE/baseball/src/Components/Game/GameStyles.jsx
Original file line number Diff line number Diff line change
@@ -265,6 +265,7 @@ const SquadBoard = {
opacity: 0.5;
text-align: center;
padding: 3px;
&:hover {
opacity: 0.7;
}
31 changes: 13 additions & 18 deletions FE/baseball/src/Components/Game/SquadBoard/SquadBoard.jsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
import { useState } from "react";
import PopUpButton from "./PopUpButton";
import SquadTable from "./SquadTable/SquadTable";
import { SquadBoard as S } from "@/Components/Game/GameStyles";
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;
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>
</>
<S.SquadBoardWrapper>
<S.PopUpBackground isMouseOver={mouseOverFlag} />
<PopUpButton handleMouseOver={handleMouseOver} />
<S.SquadBoard isMouseOver={mouseOverFlag} onMouseLeave={handleMouseOver}>
<SquadTable />
<SquadTable />
</S.SquadBoard>
</S.SquadBoardWrapper>
);
};

0 comments on commit 7bfd61a

Please sign in to comment.