From 4b7e7150b2dbacba652064cd5456472ab9a51b80 Mon Sep 17 00:00:00 2001 From: Tore Brede <Tore.Brede@uib.no> Date: Fri, 19 Nov 2021 09:53:32 +0100 Subject: [PATCH] Fixing some warnings --- frontend/src/routes/sponsor/register/stepPersonForm.tsx | 7 ++----- frontend/src/routes/sponsor/register/stepSummary.tsx | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/frontend/src/routes/sponsor/register/stepPersonForm.tsx b/frontend/src/routes/sponsor/register/stepPersonForm.tsx index 7de1357d..c4427e9d 100644 --- a/frontend/src/routes/sponsor/register/stepPersonForm.tsx +++ b/frontend/src/routes/sponsor/register/stepPersonForm.tsx @@ -171,17 +171,14 @@ const StepPersonForm = forwardRef( label={t('common:ou')} onChange={handleOuChange} > - {ous.length > 0 ? ( + {ous.length > 0 && ous .sort(i18n.language === 'en' ? enSort : nbSort) .map((ou) => ( <MenuItem key={ou.id.toString()} value={ou.id}> {i18n.language === 'en' ? ou.en : ou.nb} ({ou.id}) </MenuItem> - )) - ) : ( - <></> - )} + ))} </Select> </FormControl> diff --git a/frontend/src/routes/sponsor/register/stepSummary.tsx b/frontend/src/routes/sponsor/register/stepSummary.tsx index 36bf8c4a..9824fc99 100644 --- a/frontend/src/routes/sponsor/register/stepSummary.tsx +++ b/frontend/src/routes/sponsor/register/stepSummary.tsx @@ -1,4 +1,3 @@ -import React, { forwardRef } from 'react' import { useTranslation } from 'react-i18next' import { @@ -21,7 +20,7 @@ interface StepSummaryProperties { formData: RegisterFormData } -const StepSummary = forwardRef((props: StepSummaryProperties) => { +function StepSummary(props: StepSummaryProperties) { const { t } = useTranslation(['common']) const { formData } = props const ous = useOus() @@ -134,6 +133,6 @@ const StepSummary = forwardRef((props: StepSummaryProperties) => { </Box> </> ) -}) +} export default StepSummary -- GitLab