fix: linting typescript

pull/89/head
Pierre-Louis Guhur 1 year ago
parent e691e974a6
commit a04dc68269

@ -63,7 +63,7 @@ const ConfirmElection = ({
const { t } = useTranslation();
if (err) {
return <Error msg={apiErrors(err, t)} />;
return <Error msg={t(apiErrors(err))} />;
}
const origin =

@ -66,7 +66,7 @@ const Result = ({ candidates, numGrades, title, pid, err, finish }) => {
const newstart = new Date(finish * 1000).toLocaleDateString('fr-FR');
if (err && err !== '') {
return <Error msg={apiErrors(err, t)} />;
return <Error msg={t(apiErrors(err))} />;
}
const router = useRouter();

@ -68,7 +68,7 @@ const VoteBallot = ({ candidates, title, numGrades, pid, err, token }) => {
const { t } = useTranslation();
if (err) {
return <Error msg={apiErrors(err, t)}></Error>;
return <Error msg={t(apiErrors(err))} />;
}
const [judgments, setJudgments] = useState([]);

@ -42,7 +42,7 @@ export async function getServerSideProps({ query: { pid }, locale }) {
const VoteSuccess = ({ title, invitationOnly, pid, err }) => {
const { t } = useTranslation();
if (err && err !== '') {
return <Error msg={apiErrors(err, t)} />;
return <Error msg={t(apiErrors(err))} />;
}
return (

Loading…
Cancel
Save