Skip to content

Commit

Permalink
Merge branch 'main' into add_header_component
Browse files Browse the repository at this point in the history
  • Loading branch information
shammy642 authored Oct 23, 2024
2 parents 2c312e5 + 872db95 commit 6e645e0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Card.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export function Card({ children }) {
return (
<div className="block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700">
<div className="min-w-96 block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700">
{ children }
</div>
)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/ListPlayers.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import CheckMark from "./CheckMark";
import LoadingSpinner from "./LoadingSpinner";

export function ListPlayers({ players }) {
export function ListPlayers({ players, isLobby = false}) {
return (
<div className="max-w-lg mx-auto">
<h2 className="font-bold mb-3">Players:</h2>
Expand Down Expand Up @@ -38,7 +38,7 @@ export function ListPlayers({ players }) {
<div className="mr-2">{player.name}</div>

<div>
<LoadingSpinner />
{!isLobby && <LoadingSpinner />}
</div>
</div>
)}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/LobbyHost.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export function LobbyHost({ gameRoom, players }) {
<Header/>
<Card>
<H1>Poké Poké Guess Weight!</H1>
<ListPlayers players={players} />
<ListPlayers players={players} isLobby={true}/>

<br />
<Button handleClick={handleClick} buttonText="Start Game" />
<CardText>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/LobbyPlayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function LobbyPlayer({ gameRoom, players, redirect, setRedirect }) {
<Header/>
<Card>
<H1>Poké Poké Guess Weight!</H1>
<ListPlayers players = {players} />
<ListPlayers players = {players} isLobby={true} />
<br/>
<CardText>
<div>Waiting for host to start the game...</div>
Expand Down

0 comments on commit 6e645e0

Please sign in to comment.