Skip to content

Commit

Permalink
refactor: 프로젝트 테스트 후 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
aaaz425 committed Nov 3, 2023
1 parent 12a7b8b commit 7b600d9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 16 deletions.
2 changes: 2 additions & 0 deletions fe/src/components/GameBoard/Dice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export default function Dice() {
};

const rollDone = async () => {
if (gameInfo.dice[0] === 0 || gameInfo.dice[1] === 0) return;

const totalDiceValue = gameInfo.dice[0] + gameInfo.dice[1];
setDiceValue(totalDiceValue);
const targetPlayer = players.find(
Expand Down
14 changes: 1 addition & 13 deletions fe/src/components/GameBoard/Roulette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { styled } from 'styled-components';
export default function Roulette() {
const [mustSpin, setMustSpin] = useState(false);
const [prizeNumber, setPrizeNumber] = useState(0);
const [stockSellTime, setStockSellTime] = useState(30);
const [stockSellTime, setStockSellTime] = useState(20);
const [isEventModalOpen, setIsEventModalOpen] = useState(false);

const { gameId } = useParams();
Expand Down Expand Up @@ -107,7 +107,6 @@ export default function Roulette() {
/>
<Wrapper>
<Timer>남은 매도시간: {stockSellTime}</Timer>
<Button onClick={startSpin}>룰렛 테스트 버튼</Button>
</Wrapper>
{isEventModalOpen && <EventModal />}
{isRolling && RouletteRollingSound}
Expand All @@ -124,14 +123,3 @@ const Wrapper = styled.div`
const Timer = styled.div`
font-size: ${({ theme }) => theme.fontSize.sMedium};
`;

const Button = styled.button`
width: 150px;
margin-right: 10px;
margin-bottom: 10px;
align-self: flex-end;
border: 1px solid ${({ theme }) => theme.color.accentText};
border-radius: ${({ theme }) => theme.radius.small};
color: ${({ theme }) => theme.color.neutralTextStrong};
background-color: ${({ theme }) => theme.color.neutralBackground};
`;
3 changes: 2 additions & 1 deletion fe/src/components/Header/GameHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ const IconContainer = styled.div`
}
&.status-board {
justify-content: center;
width: 4rem;
height: 4rem;
justify-content: center;
margin-right: 75px;
}
`;
2 changes: 1 addition & 1 deletion fe/src/components/Player/LeftPlayers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ const Players = styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
justify-content: space-around;
align-items: center;
`;
2 changes: 1 addition & 1 deletion fe/src/components/Player/RightPlayers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ const Players = styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
justify-content: space-around;
align-items: center;
`;

0 comments on commit 7b600d9

Please sign in to comment.