Skip to content

Commit

Permalink
Trying to fix some build errors shown in the e2e tests of the build p…
Browse files Browse the repository at this point in the history
…hase
  • Loading branch information
Mister-Mario committed Apr 13, 2024
1 parent a8dd627 commit f168984
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ RUN npm run build
RUN npm install serve

#Execute npm run prod to run the server
CMD [ "npm", "run", "prod" ]
#CMD ["npm", "start"]
CMD [ "npm", "run", "prod" ]
2 changes: 1 addition & 1 deletion webapp/src/components/HistoricalData/HistoricalView.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function HistoricalView() {
useEffect(() => {getRecords()}, []);
return (
<div className='globalHistoricalView'>
{(records && records.length != 0) ? records.map((record, index) => (
{(records && records.length !== 0) ? records.map((record, index) => (
<HistoricalGameElement key={index} record={record} t={t} />
)): <p>{t("historicalView.no_games_played")}</p>}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CreationHistoricalRecord{
}

addQuestion(statement, answers, answerGiven, correctAnswer, numQuestion) {
if(this.record.game.questions.length == numQuestion){
if(this.record.game.questions.length === numQuestion){
this.record.game.questions.push({
question: statement,
answers: answers,
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/questionView/QuestionView.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function QuestionView(){
});
}
function computePointsForQuestion(correctAnswer, answerGiven){
if(answerGiven==correctAnswer){
if(answerGiven===correctAnswer){
points+=100;
}else if(points-50>=0){
points-=50;
Expand Down

0 comments on commit f168984

Please sign in to comment.