diff --git a/src/layout/Audio/Audio.tsx b/src/layout/Audio/Audio.tsx index 69bfd880c..62eea80bb 100644 --- a/src/layout/Audio/Audio.tsx +++ b/src/layout/Audio/Audio.tsx @@ -3,7 +3,6 @@ import React from 'react'; import { useCurrentLanguage } from 'src/features/language/LanguageProvider'; import { useLanguage } from 'src/features/language/useLanguage'; import { useParentCard } from 'src/layout/Cards/CardContext'; -import { ComponentStructureWrapper } from 'src/layout/ComponentStructureWrapper'; import { useNodeItem } from 'src/utils/layout/useNodeItem'; import type { PropsFromGenericComponent } from 'src/layout'; @@ -19,24 +18,22 @@ export function AudioComponent({ node }: IAudioProps) { const cardMediaHeight = useParentCard()?.minMediaHeight; return ( - - - + ); } diff --git a/src/layout/ComponentStructureWrapper.tsx b/src/layout/ComponentStructureWrapper.tsx index 928094949..2ceba4238 100644 --- a/src/layout/ComponentStructureWrapper.tsx +++ b/src/layout/ComponentStructureWrapper.tsx @@ -8,7 +8,6 @@ import { useFormComponentCtx } from 'src/layout/FormComponentContext'; import { useNodeItem } from 'src/utils/layout/useNodeItem'; import type { LabelProps } from 'src/components/label/Label'; import type { CompTypes } from 'src/layout/layout'; -import type { LayoutComponent } from 'src/layout/LayoutComponent'; import type { LayoutNode } from 'src/utils/layout/LayoutNode'; type ComponentStructureWrapperProps = { @@ -28,7 +27,7 @@ export function ComponentStructureWrapper({ const overrideItemProps = useFormComponentCtx()?.overrideItemProps; const _grid = useNodeItem(node, (i) => i.grid); const grid = overrideItemProps?.grid ?? _grid; - const layoutComponent = node.def as unknown as LayoutComponent; + const layoutComponent = node.def; const showValidationMessages = layoutComponent.renderDefaultValidations(); const componentWithValidations = ( diff --git a/src/layout/Video/Video.tsx b/src/layout/Video/Video.tsx index 88e0caa25..51077e498 100644 --- a/src/layout/Video/Video.tsx +++ b/src/layout/Video/Video.tsx @@ -3,7 +3,6 @@ import React from 'react'; import { useCurrentLanguage } from 'src/features/language/LanguageProvider'; import { useLanguage } from 'src/features/language/useLanguage'; import { useParentCard } from 'src/layout/Cards/CardContext'; -import { ComponentStructureWrapper } from 'src/layout/ComponentStructureWrapper'; import { useNodeItem } from 'src/utils/layout/useNodeItem'; import type { PropsFromGenericComponent } from 'src/layout'; @@ -19,24 +18,22 @@ export function VideoComponent({ node }: IVideoProps) { const cardMediaHeight = useParentCard()?.minMediaHeight; return ( - - - + ); }