Skip to content

Commit

Permalink
fixed e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
alegarman2002 committed May 1, 2024
1 parent 803b79e commit 7a7b053
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions webapp/src/components/FirstGame.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
import { Container, Typography, Box, LinearProgress} from '@mui/material';
import './FirstGame.css';
import 'react-circular-progressbar/dist/styles.css';
import axios from 'axios';
import { useLocation, useNavigate } from 'react-router-dom';
import Button from './Button';
import { Footer } from './footer/Footer';
Expand All @@ -12,7 +11,6 @@ import { gameStore } from './Util';
let currentQuestionIndex = 0;

let haveFailedQuestion = false;
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT|| 'http://localhost:8000';
let isCorrect = false
let questions = [];
let points = 0;
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function gameStore(id, username, points, questions, avgtime) {
try {

const apiEndpoint = process.env.REACT_APP_API_ENDPOINT|| 'http://localhost:8000';
const response = await axios.post(`${apiEndpoint}/storeGame`, { id, username, points, questions, avgtime});
await axios.post(`${apiEndpoint}/storeGame`, { id, username, points, questions, avgtime});
questions = []
} catch (error) {
console.error(error)
Expand Down
4 changes: 0 additions & 4 deletions webapp/src/components/game/Calculator.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ import { Nav } from '../nav/Nav';
import Button from '../Button';
import { useState, useEffect} from 'react';
import { useNavigate } from 'react-router-dom';
import axios from 'axios';

let questions = [];
let load = true;
const previousBackgroundColor = '#1a1a1a';
let points = 0;
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT|| 'http://localhost:8000';
let answeredQuestions = [];

let savedGame = false;


const Calculator = () => {

Expand Down

0 comments on commit 7a7b053

Please sign in to comment.