Skip to content

Commit

Permalink
Added a link to display on MyTrivia page that redirects to TriviaGenP…
Browse files Browse the repository at this point in the history
…age if there are no games to display
  • Loading branch information
emmanueposu committed May 31, 2024
1 parent 28472e4 commit 52ecaf2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion trivia-forge/frontend/src/Pages/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function LoginPage() {
<Form.Label>Password</Form.Label>
<Form.Control type="password" placeholder="Enter Password" value={password} onChange={(e) => setPassword(e.target.value)} />
</Form.Group>
<p>Not a member? <Link to="/signUp">Sign Up</Link></p>
<p>Not a member? <Link to="/signUp" className="text-decoration-none">Sign Up</Link></p>
<div className="d-flex justify-content-center">
<Button variant="primary" type="submit">
Login
Expand Down
7 changes: 5 additions & 2 deletions trivia-forge/frontend/src/Pages/MyTrivia.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import GameCategories from "../Components/GameCategories";
import GameQuestions from "../Components/GameQuestions";
import Slideshow from "../Components/Slideshow";
import Modal from 'react-bootstrap/Modal';
import { useNavigate } from "react-router-dom";
import { Link, useNavigate } from "react-router-dom";
import useStore from '../Components/useStore';

function MyTrivia() {
Expand Down Expand Up @@ -129,7 +129,10 @@ function MyTrivia() {
</Row>
)}

<h1 className="text-center mt-5" style={{ display: noGamesMsgDisplay }}>No games to display</h1>
<div className="text-center mt-5" style={{ display: noGamesMsgDisplay }}>
<h1>No games to display</h1>
<Link to="/triviaGen" className="text-decoration-none">Add Game</Link>
</div>

<Modal show={showWarning} onHide={handleWarningClose}>
<Modal.Header closeButton>
Expand Down
1 change: 0 additions & 1 deletion trivia-forge/frontend/src/Pages/TriviaGenPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ function TriviaGenPage() {
</Button>
) : (
<GenBtnTooltip />
// <p>ok</p>
)}
</div>
</form >
Expand Down

0 comments on commit 52ecaf2

Please sign in to comment.