Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Front end lucia #78

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch '69-making-the-webapp-use-the-record-service-through-the…
…-gateway-service' into front-end-lucia
  • Loading branch information
Mister-Mario committed Apr 6, 2024
commit 8c025f419a06b992eea0ec58bb12df237f22f1b9
6 changes: 5 additions & 1 deletion webapp/src/components/HistoricalData/HistoricalView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React, {useEffect, useState } from 'react';
import {useTranslation} from "react-i18next";
import HistoryRecordRetriever from './HistoryRecordRetriever';
import { useUserContext } from '../loginAndRegistration/UserContext';


import RecordList from './RecordList';

const retriever = new HistoryRecordRetriever();
Expand Down Expand Up @@ -44,7 +47,8 @@ function HistoricalGameElement({record,t}){

return (
<div className='centered-div'>
<button className="historicalButton" onClick={handleClick}>{t("historicalView.game")} : <em>{record.date.toLocaleDateString()} </em> - {record.points} {t("historicalView.points")} </button>
<button className="historicalButton" onClick={handleClick}>{t("historicalView.game")} : {
(new Date(parseInt(record.date))).toLocaleDateString()} - {record.points} {t("historicalView.points")} </button>
<ul style={{ display: toggle ? 'block' : 'none' }}>
<RecordList record={record}/>
</ul>
Expand Down
2 changes: 0 additions & 2 deletions webapp/src/components/questionView/QuestionView.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ function QuestionComponent({questions, numQuestion, handleClick, t, points}){

) : (
<>
{creationHistoricalRecord.setDate(Date.now())}
{creationHistoricalRecord.setPoints(points)}
<h2>{t("questionView.finished_game")} </h2>
<p>{points} {t("questionView.point")}</p>
<ul>< RecordList record={creationHistoricalRecord.getRecord().game}/></ul>
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.