Skip to content

Commit

Permalink
fix: questions page, rephrase remaining annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Torres committed Jul 26, 2022
1 parent 6844cbc commit c80d53c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/i18n/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"display_images": "Display images",
"annotations": "Annotations",
"last_annotations": "Last annotations",
"remaining_annotations": "Remaining:",
"remaining_annotations": "Remaining questions",
"annotated_annotations": "Annotated",
"filters": {
"short_label": {
Expand Down
9 changes: 5 additions & 4 deletions src/pages/questions/UserData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import Stack from "@mui/material/Stack";
import Link from "@mui/material/Link";

import CheckCircleOutlineIcon from "@mui/icons-material/CheckCircleOutline";
import CancelOutlinedIcon from "@mui/icons-material/CancelOutlined";

import { useTranslation } from "react-i18next";

import offService from "../../off";

const NB_DISPLAYED_QUESTIONS = 30;
const UserData = (props) => {
const { remainingQuestionNb = 0, answers = [] } = props;
const UserData = ({ remainingQuestionNb = 0, answers = [] }) => {
const { t } = useTranslation();

let displayedAnswers = answers.filter(
(question) => question.validationValue !== -1
Expand All @@ -26,7 +27,7 @@ const UserData = (props) => {
return (
<Box>
<Stack spacing={1}>
<Typography sx={{ my: 2 }}>Remaining: {remainingQuestionNb}</Typography>
<Typography sx={{ my: 2 }}>{t("questions.remaining_annotations")}: {remainingQuestionNb}</Typography>
{displayedAnswers.map(
({ insight_id, barcode, value, insight_type, validationValue }) => (
<Stack key={insight_id} direction="row">
Expand Down

0 comments on commit c80d53c

Please sign in to comment.