Merged in fix/BOOK-755-alert-content (pull request #3523)
fix(BOOK-755, BOOK-787): Fixed issue for phone number and sidepeeks not showing * fix(BOOK-755): Fixed issue for phone number and sidepeeks not showing * fix(BOOK-755): fix issue phonenumber alert * fix(BOOK-755): fix issue phonenumber Approved-by: Matilda Landström
This commit is contained in:
committed by
Bianca Widstam
parent
b3c4761ae5
commit
0cda37808e
@@ -4,9 +4,7 @@ import { nodesToHtml } from "./utils"
|
||||
|
||||
import styles from "./jsontohtml.module.css"
|
||||
|
||||
import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert"
|
||||
import { ImageVaultAsset } from "@scandic-hotels/common/utils/imageVault"
|
||||
import { AlertSidepeekContent } from "../../types/sidepeekContent"
|
||||
import { ContentBlockType } from "./types/rte/enums"
|
||||
import type { RTENode } from "./types/rte/node"
|
||||
import type { RenderOptions } from "./types/rte/option"
|
||||
@@ -17,7 +15,7 @@ export type Node<T> = {
|
||||
|
||||
export type Embeds =
|
||||
| {
|
||||
__typename: Exclude<ContentBlockType, "ImageContainer" | "Alert">
|
||||
__typename: Exclude<ContentBlockType, "ImageContainer">
|
||||
system?: { uid: string } | null
|
||||
url?: string | null
|
||||
permanent_url?: string | null
|
||||
@@ -31,25 +29,6 @@ export type Embeds =
|
||||
image_left?: ImageVaultAsset
|
||||
image_right?: ImageVaultAsset
|
||||
}
|
||||
| {
|
||||
__typename: "Alert"
|
||||
system?: { uid: string } | null
|
||||
type: AlertTypeEnum
|
||||
heading: string | null
|
||||
text: string
|
||||
phoneContact?: {
|
||||
displayText: string
|
||||
phoneNumber: string
|
||||
footnote?: string | null
|
||||
} | null
|
||||
sidepeekContent?: AlertSidepeekContent | null
|
||||
sidepeekCtaText?: string | null
|
||||
link?: {
|
||||
url: string
|
||||
title: string
|
||||
keepSearchParams?: boolean
|
||||
} | null
|
||||
}
|
||||
|
||||
export type EmbedByUid = Record<string, Node<Embeds>>
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import {
|
||||
mapImageVaultAssetResponseToImageVaultAsset,
|
||||
mapInsertResponseToImageVaultAsset,
|
||||
} from "@scandic-hotels/common/utils/imageVault"
|
||||
import { Alert } from "../Alert"
|
||||
import { TextLink } from "../TextLink"
|
||||
import type { EmbedByUid } from "./JsonToHtml"
|
||||
import type { Attributes } from "./types/rte/attrs"
|
||||
@@ -459,8 +458,6 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
}
|
||||
return null
|
||||
} else if (entry?.node.__typename === "Alert") {
|
||||
return <Alert key={node.uid} {...entry.node} />
|
||||
} else if (
|
||||
entry?.node.__typename === "AccountPage" ||
|
||||
entry?.node.__typename === "CampaignOverviewPage" ||
|
||||
|
||||
Reference in New Issue
Block a user