Skip to content

Commit

Permalink
Style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
daithihearn committed Jan 23, 2023
1 parent bdf1ea8 commit db7555d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/components/Game/MyCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ const MyCards: React.FC = () => {

const playCard = useCallback(() => {
if (selectedCards.length !== 1) {
enqueueSnackbar("Please select exactly one card to play")
enqueueSnackbar("Please select exactly one card to play", {
variant: "warning",
})
} else {
dispatch(
GameService.playCard(gameId!, selectedCards[0].name),
Expand Down
7 changes: 6 additions & 1 deletion src/components/Game/PlayersAndCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ const PlayersAndCards = () => {
return (
<CardBody className="cardArea">
<Container>
<Row xs="6" sm="6" md="6" lg="6" xl="6">
<Row
xs={sortedPlayers.length}
sm={sortedPlayers.length}
md={sortedPlayers.length}
lg={sortedPlayers.length}
xl={sortedPlayers.length}>
{sortedPlayers.map(player => (
<PlayerCard
key={`playercard_${player.id}`}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Game/WebsocketManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ const WebsocketHandler = () => {
p => p.id === buyCardsEvt.playerId,
)
if (player)
enqueueSnackbar(`${player.name} bought ${buyCardsEvt.bought}`)
enqueueSnackbar(`${player.name} bought ${buyCardsEvt.bought}`, {
variant: "info",
})
},
[playerProfiles],
)
Expand Down

0 comments on commit db7555d

Please sign in to comment.