From 360bf76cdf8e59878064fec86da75f8f005abea0 Mon Sep 17 00:00:00 2001 From: Moritz Hofer Date: Mon, 15 Jul 2024 10:59:32 +0200 Subject: [PATCH 1/2] fix: Remove metadata call as not every solution supports SeralizationModifiers --- src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx b/src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx index b10df641..7a609107 100644 --- a/src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx +++ b/src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx @@ -45,7 +45,7 @@ export function SubmodelsOverviewCard(props: SubmodelsOverviewCardProps) { for (const reference of props.smReferences as Reference[]) { for (const key of reference.keys as Key[]) { try { - const metadata = await submodelClient.getSubmodelMetaDataById(key.value); + const metadata = await submodelClient.getSubmodelById(key.value); submodels.push({ id: key.value, label: metadata.idShort ?? '', metadata }); } catch (e) { console.error(e); From 94110aa1c9e1c579b1439756e9e7dfe29f621297 Mon Sep 17 00:00:00 2001 From: Moritz Hofer Date: Wed, 17 Jul 2024 10:31:38 +0200 Subject: [PATCH 2/2] fix: Remove unused import --- src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx b/src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx index 46129eb2..a441c3bc 100644 --- a/src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx +++ b/src/app/[locale]/viewer/_components/SubmodelsOverviewCard.tsx @@ -4,7 +4,7 @@ import { useIsMobile } from 'lib/hooks/UseBreakpoints'; import { messages } from 'lib/i18n/localization'; import { FormattedMessage } from 'react-intl'; import { SubmodelDetail } from './submodel/SubmodelDetail'; -import { Key, Reference, Submodel } from '@aas-core-works/aas-core3.0-typescript/types'; +import { Reference, Submodel } from '@aas-core-works/aas-core3.0-typescript/types'; import { useAsyncEffect } from 'lib/hooks/UseAsyncEffect'; import { SubmodelSorting } from 'app/[locale]/viewer/_components/submodel/sorting/SubmodelSorting'; import { TabSelectorItem, VerticalTabSelector } from 'components/basics/VerticalTabSelector';