From e8d9d7667b2fddff63aa798c2882c0e83044a6ef Mon Sep 17 00:00:00 2001 From: Shubham Vaidya Date: Mon, 12 Aug 2024 13:12:15 +0530 Subject: [PATCH 1/2] fix: remove code that always displays error message on screen (#230) https://github.com/eclipse-tractusx/portal-frontend-registration/issues/229 --- CHANGELOG.md | 6 ++++++ src/components/dragdrop.tsx | 1 - src/components/dragdropLayout.tsx | 10 +--------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17543d49..a26bd16b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## unreleased + +### Bugfix + +- remove code that always displays error message on screen [#230](https://github.com/eclipse-tractusx/portal-frontend-registration/pull/230) + ## 2.0.1 ### Change diff --git a/src/components/dragdrop.tsx b/src/components/dragdrop.tsx index d5a758de..7e5b54d5 100644 --- a/src/components/dragdrop.tsx +++ b/src/components/dragdrop.tsx @@ -199,7 +199,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} From ba040e85e635f51d9fba085b3a8048910744b075 Mon Sep 17 00:00:00 2001 From: Shubham Vaidya Date: Tue, 13 Aug 2024 18:18:58 +0530 Subject: [PATCH 2/2] fix: country value not updating when moving back and forth between steps (#232) https://github.com/eclipse-tractusx/portal-frontend-registration/issues/231 --- CHANGELOG.md | 2 ++ src/components/cax-companyData.tsx | 16 +++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a26bd16b..778147f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,10 @@ ### 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) + ## 2.0.1 ### Change 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 = () => { ( )}