diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dbf7b56..1211cc2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Bugfix +- country value is not updating if user moves back and forth between steps [#232](https://github.com/eclipse-tractusx/portal-frontend-registration/pull/232) +- remove code that always displays error message on screen [#230](https://github.com/eclipse-tractusx/portal-frontend-registration/pull/230) - updated the logic for maxFiles count in upload docs step [#234](https://github.com/eclipse-tractusx/portal-frontend-registration/pull/234) ## 2.0.1 diff --git a/src/components/cax-companyData.tsx b/src/components/cax-companyData.tsx index 978b4b02..9a1822cd 100644 --- a/src/components/cax-companyData.tsx +++ b/src/components/cax-companyData.tsx @@ -123,12 +123,14 @@ export const CompanyDataCax = () => { useEffect(() => { const index = i18n.language === 'de' ? 0 : 1 - countryList = countryList?.map((country) => ({ - id: country.alpha2Code, - label: - country.countryName[index]?.value + ' (' + country.alpha2Code + ')', - })) - setCountryArr(countryList) + if (countryList?.length > 0 && Array.isArray(countryList[0].countryName)) { + countryList = countryList?.map((country) => ({ + id: country.alpha2Code, + label: + country.countryName[index]?.value + ' (' + country.alpha2Code + ')', + })) + setCountryArr(countryList) + } }, [countryList, i18n.language]) const defaultSelectedCountry = countryArr?.filter( @@ -586,7 +588,7 @@ export const CompanyDataCax = () => { ( )} diff --git a/src/components/dragdrop.tsx b/src/components/dragdrop.tsx index 2cd8dad2..f793a9d7 100644 --- a/src/components/dragdrop.tsx +++ b/src/components/dragdrop.tsx @@ -216,7 +216,6 @@ export const DragDrop = () => { )} inputContent={} diff --git a/src/components/dragdropLayout.tsx b/src/components/dragdropLayout.tsx index b1134f94..3be0cb9b 100644 --- a/src/components/dragdropLayout.tsx +++ b/src/components/dragdropLayout.tsx @@ -19,24 +19,16 @@ ********************************************************************************/ import { type ILayoutProps } from 'react-dropzone-uploader' -import { useTranslation } from 'react-i18next' interface CustomLayoutProps extends ILayoutProps { error: string - documentError: string + documentError?: string } function DragdropLayout(props: CustomLayoutProps) { - const { t } = useTranslation() - return (
{props.input}
- {props.documentError && ( -
- {t('documentUpload.dragDropExceedSizeErrorMsg')} -
- )} {props.error && (
{props.error}