Skip to content

Commit

Permalink
fix(description): fixed page break issue when api response don't have…
Browse files Browse the repository at this point in the history
… value for each language
  • Loading branch information
lavanya-bmw committed Aug 2, 2023
1 parent d544827 commit 7e843f2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/pages/AppOverview/ChangeDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export default function ChangeDescription() {

const defaultValues = useMemo(() => {
return {
longDescriptionEN: description?.[0].longDescription ?? '',
longDescriptionDE: description?.[1].longDescription ?? '',
shortDescriptionEN: description?.[0].shortDescription ?? '',
shortDescriptionDE: description?.[1].shortDescription ?? '',
longDescriptionEN: description?.[0]?.longDescription ?? '',
longDescriptionDE: description?.[1]?.longDescription ?? '',
shortDescriptionEN: description?.[0]?.shortDescription ?? '',
shortDescriptionDE: description?.[1]?.shortDescription ?? '',
}
}, [description])

Expand Down Expand Up @@ -247,7 +247,7 @@ export default function ChangeDescription() {
<TabPanel value={activeTab} index={1}>
<div className="form-field">
{['shortDescriptionEN', 'shortDescriptionDE'].map(
(item: string, i) => (
(item: string) => (
<div key={item}>
<ConnectorFormInputFieldShortAndLongDescription
{...{
Expand Down

0 comments on commit 7e843f2

Please sign in to comment.