Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #332 from SELab-2/stats_bug
Browse files Browse the repository at this point in the history
fix stat bug
  • Loading branch information
matt01y authored May 20, 2024
2 parents 77c313e + 12c4d11 commit 6350144
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/components/Statistics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import {IoIosStats} from "react-icons/io";
import {useTranslation} from 'react-i18next';
import {SUBMISSION_STATE} from "../utils/ApiInterfaces.ts";

export default function Statistics(props: { statistics: { [key: number]: number }}): JSX.Element {
export default function Statistics(props: { statistics: { [key: number]: number } }): JSX.Element {

const { t } = useTranslation();
const {t} = useTranslation();

const data = [
{title: t('statistics.success'), value: props.statistics[SUBMISSION_STATE.Approved], color: '#50C878'},
{title: t('statistics.failed'), value: props.statistics[SUBMISSION_STATE.Rejected], color: '#C13C37'},
{title: t('statistics.nothing_yet'), value: props.statistics[SUBMISSION_STATE.Pending], color: '#D3D3D3'}
]
].filter((entry) => entry.value !== 0);

const [modalActive, setModalActive] = useState(false);

Expand Down

0 comments on commit 6350144

Please sign in to comment.