feat(SW-187): Fixed toggling issue

This commit is contained in:
Pontus Dreij
2024-09-11 10:18:39 +02:00
parent 84fb10aa2c
commit 76c7cfa6f0
3 changed files with 15 additions and 10 deletions

View File

@@ -7,7 +7,6 @@ import { removeMultipleSlashes } from "@/utils/url"
import { imageVaultAssetTransformedSchema } from "../schemas/imageVault"
import { Image } from "@/types/image"
import { PageLinkEnum } from "@/types/requests/pageLinks"
// Help me write this zod schema based on the type ContactConfig
export const validateContactConfigSchema = z.object({
@@ -310,7 +309,7 @@ const validateInternalLink = z
const lang = node.system.locale
return {
url: originalUrl || removeMultipleSlashes(`/${lang}/${url}`),
url: originalUrl ?? removeMultipleSlashes(`/${lang}/${url}`),
title: node.title,
}
})
@@ -500,7 +499,7 @@ const cardButtonSchema = z
const href =
isContentstackLink && externalLink.href
? externalLink.href
: linkConnectionData?.href || ""
: linkConnectionData?.href ?? ""
return {
openInNewTab: data.open_in_new_tab,