+
+
-
{image.meta.caption}
-
+ {caption ? (
+
+ {image.meta.caption}
+
+ ) : null}
+
)
}
}
@@ -506,10 +537,10 @@ export const renderOptions: RenderOptions = {
next: RTENext,
fullRenderOptions: RenderOptions
) => {
- const props = extractPossibleAttributes(node.attrs)
+ const { className, ...props } = extractPossibleAttributes(node.attrs)
return (
-
-
+
+
{next(node.children, embeds, fullRenderOptions)}
@@ -531,9 +562,11 @@ export const renderOptions: RenderOptions = {
next: RTENext,
fullRenderOptions: RenderOptions
) => (
-
- {next(node.children, embeds, fullRenderOptions)}
-
+
+
+ {next(node.children, embeds, fullRenderOptions)}
+
+
),
}
const props = extractPossibleAttributes(node.attrs)
@@ -629,9 +662,9 @@ export const renderOptions: RenderOptions = {
next: RTENext,
fullRenderOptions: RenderOptions
) => {
- const props = extractPossibleAttributes(node.attrs)
+ const { className, ...props } = extractPossibleAttributes(node.attrs)
const compatibleClassName = makeCssModuleCompatibleClassName(
- props.className,
+ className,
"ul"
)
@@ -644,10 +677,10 @@ export const renderOptions: RenderOptions = {
}
return (
-
+
{
- return {children}
+ return (
+
+ {children}
+
+ )
},
[RTEMarkType.italic]: (children: React.ReactNode) => {
@@ -672,7 +709,11 @@ export const renderOptions: RenderOptions = {
},
[RTEMarkType.underline]: (children: React.ReactNode) => {
- return {children}
+ return (
+
+ {children}
+
+ )
},
[RTEMarkType.strikethrough]: (children: React.ReactNode) => {
@@ -705,13 +746,9 @@ export const renderOptions: RenderOptions = {
className?: string,
id?: string
) => {
- let props = {
- className,
- id,
- }
- if (!className) {
- delete props.className
- }
+ const props = { id }
+ let propsClassName = className
+
if (!id) {
delete props.id
}
@@ -721,60 +758,74 @@ export const renderOptions: RenderOptions = {
// @ts-ignore: We want to set css modules classNames even if it does not correspond
// to an existing class in the module style sheet. Due to our css modules plugin for
// typescript, we cannot do this without the ts-ignore
- props.className = styles[className]
+ propsClassName = styles[className]
}
}
if (className === AvailableParagraphFormatEnum.footnote) {
return (
-
- {children}
-
+
+
+ {children}
+
+
)
}
if (className === AvailableParagraphFormatEnum.caption) {
return (
-
- {children}
-
+
+
+ {children}
+
+
)
}
if (className === AvailableParagraphFormatEnum["script-1"]) {
return (
-
- {children}
-
+
+
+ {children}
+
+
)
}
if (className === AvailableParagraphFormatEnum["script-2"]) {
return (
-
- {children}
-
+
+
+ {children}
+
+
)
}
if (className === AvailableParagraphFormatEnum["subtitle-1"]) {
return (
-
- {children}
-
+
+
+ {children}
+
+
)
}
if (className === AvailableParagraphFormatEnum["subtitle-2"]) {
return (
-
- {children}
-
+
+
+ {children}
+
+
)
}
return (
-
- {children}
-
+
+
+ {children}
+
+
)
},
diff --git a/apps/scandic-web/components/Sidebar/index.tsx b/apps/scandic-web/components/Sidebar/index.tsx
index ac1ad3c32..a3c7d6438 100644
--- a/apps/scandic-web/components/Sidebar/index.tsx
+++ b/apps/scandic-web/components/Sidebar/index.tsx
@@ -20,12 +20,11 @@ export default function Sidebar({ blocks }: SidebarProps) {
switch (block.typename) {
case SidebarEnums.blocks.Content:
return (
-
+
)
case SidebarEnums.blocks.DynamicContent:
switch (block.dynamic_content.component) {
diff --git a/apps/scandic-web/components/Webviews/AccountPage/Blocks.tsx b/apps/scandic-web/components/Webviews/AccountPage/Blocks.tsx
index 18e03eb39..b194430e5 100644
--- a/apps/scandic-web/components/Webviews/AccountPage/Blocks.tsx
+++ b/apps/scandic-web/components/Webviews/AccountPage/Blocks.tsx
@@ -80,14 +80,13 @@ export default async function Content({ content }: ContentProps) {
)
case BlocksEnums.block.TextContent:
return (
-
+
)
default:
return null
diff --git a/apps/scandic-web/components/Webviews/LoyaltyPage/Blocks.tsx b/apps/scandic-web/components/Webviews/LoyaltyPage/Blocks.tsx
index 6b5c54b53..8bcfbab4c 100644
--- a/apps/scandic-web/components/Webviews/LoyaltyPage/Blocks.tsx
+++ b/apps/scandic-web/components/Webviews/LoyaltyPage/Blocks.tsx
@@ -23,12 +23,11 @@ export default async function Blocks({ blocks }: BlocksProps) {
)
case BlocksEnums.block.Content:
return (
-
+
)
case BlocksEnums.block.DynamicContent:
const dynamicContent = {