Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
shammy642 committed Oct 23, 2024
1 parent 2b5f96b commit fd53a04
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 27 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/Card.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function Card({ children }) {
return (
<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 className="block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700 font-normal text-gray-700 dark:text-gray-400">
{ children }
</div>
)
}
6 changes: 0 additions & 6 deletions frontend/src/components/GuessForm.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
// imports
import { CardText } from "../components/CardText";

// A form that allows a user to input tet and numbers
export function GuessForm(props) {
return (
<>
<form className="max-w-sm mx-auto">
<div className="md-5">
<CardText>
<label htmlFor="website-admin">How much does this Pokémon weight?</label>
</CardText>
<br/>
<div className="flex">

Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/ListPlayers.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import CheckMark from "./CheckMark";
import LoadingSpinner from "./LoadingSpinner";
import { CardText } from "./CardText";

export function ListPlayers({ players }) {
return (
<div className="max-w-lg mx-auto">
<h2 className="font-bold mb-3">Players:</h2>

<CardText><h2 className="font-bold mb-3">Players:</h2>
</CardText>


<div className="flex flex-wrap gap-3 justify-center">
{players &&
players.map((player, index) => (
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/components/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export function Table({ players }) {

return (
<div className="relative overflow-y-auto shadow-md sm:rounded-lg max-h-36 my-6">
<table className="w-full text-sm text-center rtl:text-right text-white dark:text-white">
<thead className="sticky top-0 text-md text-white uppercase bg-gray-50 dark:bg-gray-700 dark:text-white">
<table className="w-full text-sm text-center rtl:text-right text-gray-700 dark:bg-gray-700">
<thead className="sticky top-0 text-md uppercase bg-gray-50 font-normal text-gray-700 dark:bg-gray-200">

<tr>
<th scope="col" className="px-3 py-2">
Pos.
Expand All @@ -33,7 +34,7 @@ export function Table({ players }) {
{players.map((player, index) => (
<tr
key={index}
className="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"
className=" border-b dark:border-gray-700text-gray-700 dark:bg-gray-200"
>
<td className="px-3 py-2">{position(index)}</td>
<td className="px-3 py-2">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/InGame.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function InGame({ players, redirect, pokemon, setRedirect, remainingTime
<img src={pokemon.pictureURL} />
</div>
<div className="guess m-3">
<h1 className="text-xl mb-2">Guess <b>{pokemon.name}</b>&apos;s weight!:</h1>
<h1 className="text-xl mb-2">Guess <b>{pokemon.name}</b>&apos;s weight!</h1>

<GuessForm input={input} setInput={setInput}></GuessForm>
<br></br>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/LandingHost.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function LandingHost() {
<h1 data-testid="game-name" className="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
Poké Poké Guess Weight!
</h1>
<CardText>

<p>A quick-fire multiplayer game</p>
<div className="m-6 border-2 rounded-lg px-8 py-5">
<p className="mb-3">Rules :</p>
Expand All @@ -59,7 +59,7 @@ export function LandingHost() {
</ul>
</div>
<img src="https://i.gifer.com/5SvD.gif" className="max-w-20" />
</CardText>

<UsernameForm
input={input}
error={error}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/LandingPlayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function LandingPlayer() {
<h1 data-testid="game-name" className="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
Poké Poké Guess Weight!
</h1>
<CardText>

<p>A quick-fire multiplayer game</p>
<div className="m-6 border-2 rounded-lg px-8 py-5">
<p className="mb-3">Rules :</p>
Expand All @@ -63,7 +63,7 @@ export function LandingPlayer() {
<li>Unlimited players</li>
</ul>
</div>
</CardText>


<img src="https://i.gifer.com/5SvD.gif" className="max-w-20" />
<UsernameForm
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/pages/LobbyHost.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Button } from "../components/Button";
import { socket } from "../socket";
import { useNavigate } from "react-router-dom";
import { ListPlayers } from "../components/ListPlayers";
import { CardText } from "../components/CardText";
import { Card } from "../components/Card";
import { Header } from "../components/Header";
import { Footer } from "../components/Footer";
Expand All @@ -25,9 +24,7 @@ export function LobbyHost({ gameRoom, players }) {
<ListPlayers players={players} />
<br />
<Button handleClick={handleClick} buttonText="Start Game" />
<CardText>
<div>Share your game link:</div>
</CardText>
<p>Share your game link:</p>
<CopyToClipboardButton
content={`${window.location.origin}/join/${gameRoom}`}
/>
Expand Down
13 changes: 7 additions & 6 deletions frontend/src/pages/LobbyPlayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useNavigate } from "react-router-dom";
import { ListPlayers } from "../components/ListPlayers";
import { Header } from "../components/Header";
import { Footer } from "../components/Footer";
import { CardText } from "../components/CardText";
import CopyToClipboardButton from "../components/CopyToClipboardButton";
import { Card } from "../components/Card";

Expand All @@ -28,11 +27,13 @@ export function LobbyPlayer({ gameRoom, players, redirect, setRedirect }) {
</h1>
<ListPlayers players = {players} />
<br/>
<CardText>
<div>Waiting for host to start the game...</div>
<br />
<div>Share your game link:</div>
</CardText>

<p>Waiting for host to start the game...</p>

<br/>

<p>Share your game link:</p>

<CopyToClipboardButton content={`${window.location.origin}/join/${gameRoom}`}/>
</Card>
<Footer/>
Expand Down

0 comments on commit fd53a04

Please sign in to comment.