Skip to content

Commit

Permalink
feat: describe eco-score page (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette authored Oct 12, 2022
1 parent 413f923 commit 7ac4946
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/i18n/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,5 +329,9 @@
"deselect_all": "Unselect all",
"incorrect": "Wrong",
"correct": "Correct ({{label}})"
},
"eco-score": {
"description": "Here is a summary of questions that could improve Eco-Score computation",
"countryLabel": "Country"
}
}
4 changes: 4 additions & 0 deletions src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,5 +329,9 @@
"deselect_all": "Unselect all",
"incorrect": "Wrong",
"correct": "Correct ({{label}})"
},
"eco-score": {
"description": "Here is a summary of questions that could improve Eco-Score computation",
"countryLabel": "Country"
}
}
5 changes: 5 additions & 0 deletions src/pages/eco-score/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import Stack from "@mui/material/Stack";
import TextField from "@mui/material/TextField";
import MenuItem from "@mui/material/MenuItem";
import Divider from "@mui/material/Divider";
import Typography from "@mui/material/Typography";

import QuestionCard from "../../components/QuestionCard";
import Opportunities from "../../components/Opportunities";
import { DEFAULT_FILTER_STATE } from "../../components/QuestionFilter/const";
import { useTranslation } from "react-i18next";

const ecoScoreCards = [
{
Expand Down Expand Up @@ -161,6 +163,7 @@ export const countryNames = [
];

export default function EcoScore() {
const { t } = useTranslation();
const [selectedCountry, setSelectedCountry] = React.useState(countryNames[0]);

return (
Expand All @@ -170,6 +173,7 @@ export default function EcoScore() {
padding: 5,
}}
>
<Typography>{t("eco-score.description")}</Typography>
<Box
sx={{
display: "grid",
Expand All @@ -187,6 +191,7 @@ export default function EcoScore() {
<Divider />
<TextField
select
label={t("eco-score.countryLabel")}
value={selectedCountry}
onChange={(event) => {
console.log(event.target.value);
Expand Down

0 comments on commit 7ac4946

Please sign in to comment.