-
+
);
}
diff --git a/frontend/src/pages/LandingHost.jsx b/frontend/src/pages/LandingHost.jsx
index fdc4bbc..198e213 100644
--- a/frontend/src/pages/LandingHost.jsx
+++ b/frontend/src/pages/LandingHost.jsx
@@ -6,10 +6,13 @@ import { Button } from "../components/Button";
import { useNavigate } from "react-router-dom";
import { useState } from "react";
import { UsernameForm } from "../components/UsernameForm";
-import { CardText } from "../components/CardText";
+import {
+
+} from "../components/CardText";
import { Card } from "../components/Card";
import { Header } from "../components/Header";
import { Footer } from "../components/Footer";
+import { H1 } from "../components/H1";
// page function
@@ -21,12 +24,6 @@ export function LandingHost() {
const [error, setError] = useState("");
- //user cna type in the form
- const handleInputChange = (e) => {
- const value = e.target.value;
- setInput(value);
- };
-
//click should redirect the user to the lobby
const handleClick = (e) => {
e.preventDefault();
@@ -46,10 +43,7 @@ export function LandingHost() {
-
- Poké Poké Guess Weight!
-
-
+
Poké Poké Guess Weight!
A quick-fire multiplayer game
Rules :
diff --git a/frontend/src/pages/LandingPlayer.jsx b/frontend/src/pages/LandingPlayer.jsx
index d7503ed..aec8204 100644
--- a/frontend/src/pages/LandingPlayer.jsx
+++ b/frontend/src/pages/LandingPlayer.jsx
@@ -8,6 +8,7 @@ import { CardText } from "../components/CardText"
import { Card } from "../components/Card"
import { Header } from "../components/Header";
import { Footer } from "../components/Footer";
+import { H1 } from "../components/H1"
// landing page when a user clicks on a link generated by the host to join a game
@@ -19,16 +20,8 @@ export function LandingPlayer() {
const params = useParams()
const navigate = useNavigate()
-
- //user cna type in the form
- const handleInputChange = (e) => {
- const value = e.target.value;
- setInput(value);
- }
-
//click should redirect the user to the lobby
const handleClick = (e) => {
-
e.preventDefault();
// Validate if the input is not empty
@@ -51,9 +44,8 @@ export function LandingPlayer() {
-
- Poké Poké Guess Weight!
-
+
Poké Poké Guess Weight!
+
A quick-fire multiplayer game
@@ -70,7 +62,6 @@ export function LandingPlayer() {
input={input}
error={error}
setInput={setInput}
- handleInputChange={handleInputChange}
avatar={avatar}
setAvatar={setAvatar}
>
diff --git a/frontend/src/pages/LobbyHost.jsx b/frontend/src/pages/LobbyHost.jsx
index 1aec6e9..c5db7eb 100644
--- a/frontend/src/pages/LobbyHost.jsx
+++ b/frontend/src/pages/LobbyHost.jsx
@@ -8,6 +8,7 @@ import { Card } from "../components/Card";
import { Header } from "../components/Header";
import { Footer } from "../components/Footer";
import CopyToClipboardButton from "../components/CopyToClipboardButton";
+import { H1 } from "../components/H1";
export function LobbyHost({ gameRoom, players }) {
const navigate = useNavigate();
@@ -21,7 +22,9 @@ export function LobbyHost({ gameRoom, players }) {
+
Poké Poké Guess Weight!
+
Share your game link:
diff --git a/frontend/src/pages/LobbyPlayer.jsx b/frontend/src/pages/LobbyPlayer.jsx
index a2c5104..3fbe55d 100644
--- a/frontend/src/pages/LobbyPlayer.jsx
+++ b/frontend/src/pages/LobbyPlayer.jsx
@@ -6,6 +6,7 @@ import { Header } from "../components/Header";
import { Footer } from "../components/Footer";
import CopyToClipboardButton from "../components/CopyToClipboardButton";
import { Card } from "../components/Card";
+import { H1 } from "../components/H1";
export function LobbyPlayer({ gameRoom, players, redirect, setRedirect }) {
@@ -22,9 +23,7 @@ export function LobbyPlayer({ gameRoom, players, redirect, setRedirect }) {
-
- Poké Poké Guess Weight!
-
+
Poké Poké Guess Weight!
diff --git a/frontend/src/pages/RoundEnd.jsx b/frontend/src/pages/RoundEnd.jsx
index 4272299..bfcbc6d 100644
--- a/frontend/src/pages/RoundEnd.jsx
+++ b/frontend/src/pages/RoundEnd.jsx
@@ -11,6 +11,7 @@ import { Card } from "../components/Card";
import { Table } from "../components/Table";
import { Header } from "../components/Header";
import { Footer } from "../components/Footer";
+import { H1 } from "../components/H1";
export function RoundEnd({
gameState,
@@ -44,6 +45,7 @@ export function RoundEnd({
+
Poké Poké Guess Weight!
Scores
{gameState && gameState.players && (
diff --git a/frontend/tests/pages/InGame.test.jsx b/frontend/tests/pages/InGame.test.jsx
index a897e1e..61aec20 100644
--- a/frontend/tests/pages/InGame.test.jsx
+++ b/frontend/tests/pages/InGame.test.jsx
@@ -48,7 +48,7 @@ describe("InGame tests", () => {
render(
);
- const heading = screen.getByTestId("guess-label");
+ const heading = screen.getByTestId("game-name");
expect(heading.textContent).toEqual("Poké Poké Guess Weight!");
});
test("given a list of players, they are visible", () => {