Skip to content

Commit

Permalink
Added title to pages
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanueposu committed May 14, 2024
1 parent 36bf1e2 commit dc9f70a
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 54 deletions.
1 change: 0 additions & 1 deletion trivia-forge/frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<link rel="icon" type="image/svg+xml" href="/fire.svg" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Trivia Forge</title>
</head>

<body>
Expand Down
2 changes: 0 additions & 2 deletions trivia-forge/frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,4 @@ footer {

.card:hover {
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
/* border: solid;
border-color: darkgrey; */
}
2 changes: 0 additions & 2 deletions trivia-forge/frontend/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { useState } from 'react';
import reactLogo from './assets/react.svg';
import viteLogo from '/vite.svg';
import './App.css';
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Home from "./Pages/HomePage";
Expand Down
42 changes: 0 additions & 42 deletions trivia-forge/frontend/src/Components/BootstrapTable.jsx

This file was deleted.

5 changes: 3 additions & 2 deletions trivia-forge/frontend/src/Pages/HomePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ function Home() {

return (
<Container className="homepage-container">
<title>Home</title>
<Row>
<Col>
<svg class="header-animation">
<text x="50%" y="50%" dy=".35em" text-anchor="middle">
<svg className="header-animation">
<text x="50%" y="50%" dy=".35em" textAnchor="middle">
Trivia Forge
</text>
</svg>
Expand Down
7 changes: 4 additions & 3 deletions trivia-forge/frontend/src/Pages/MyTrivia.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function MyTrivia() {

return (
<>
<title>My Trivia</title>
{games &&(
games.length > 0 ? (
<Row xs={2} md={4} className="g-4 m-4">
Expand All @@ -45,11 +46,11 @@ function MyTrivia() {
<Card className="" style={{backgroundColor: "#f5f3f4"}}>
<Card.Header as="h4">{game.title}</Card.Header>
<Card.Body>
<Card.Title as="h6">Category:</Card.Title>
<Card.Title as="h6">Categories:</Card.Title>
<Card.Text>
<GameCategories data={game}/>
</Card.Text>
<Card.Title as="h6">Number of Questions:</Card.Title>
<Card.Title as="h6">Questions:</Card.Title>
<Card.Text>
<GameQuestions data={game}/>
</Card.Text>
Expand All @@ -63,7 +64,7 @@ function MyTrivia() {
))}
</Row>
) : (
<p>No games to display.</p>
<h1 className="text-center mt-5">No games to display.</h1>
)
)}
<Modal show={show} onHide={handleClose} fullscreen={true}>
Expand Down
1 change: 1 addition & 0 deletions trivia-forge/frontend/src/Pages/SignUpPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function SignUpPage() {

return (
<>
<title>Sign Up</title>
<Card style={{ width: '35rem', margin: '0 auto', float: 'none' }}>
<Form onSubmit={handleSubmit} className="form-group">
<Form.Group className="mb-3" controlId="formBasicEmail">
Expand Down
1 change: 1 addition & 0 deletions trivia-forge/frontend/src/Pages/TriviaGenPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ function TriviaGenPage() {
// render component as a form
return (
<div>
<title>Create New Trivia</title>
<h1>
Trivia Generator
</h1>
Expand Down
1 change: 1 addition & 0 deletions trivia-forge/frontend/src/Pages/TriviaReviewPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function TriviaReviewPage() {

return (
<div>
<title>Trivia Review</title>
<div className="trivia-review-container">
<h1 className="trivia-review-heading">Review and Edit Trivia Questions</h1>
{categories.map((cat, index) => (
Expand Down
1 change: 0 additions & 1 deletion trivia-forge/frontend/src/Services/TF-db_services.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ export const getChoices = async (questions) => {
for (let i = 0; i < response.data.length; i++) {
questions[response.data[i].question_id]['choices'].push(response.data[i].text);
}
console.log(questions)
return questions;
} catch (error) {
console.error('Failed to fetch choices');
Expand Down
1 change: 0 additions & 1 deletion trivia-forge/frontend/src/assets/react.svg

This file was deleted.

0 comments on commit dc9f70a

Please sign in to comment.