fix(SW-368): import type fixes

This commit is contained in:
Erik Tiekstra
2024-09-25 09:41:42 +02:00
parent 4352997322
commit 6a85cfd19c
5 changed files with 14 additions and 19 deletions

View File

@@ -3,10 +3,10 @@ import Link from "next/link"
import { ChevronRightSmallIcon } from "@/components/Icons"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import { LinkChipProps } from "./chip"
import styles from "./chip.module.css"
import type { LinkChipProps } from "./chip"
export default function LinkChip({ url, title }: LinkChipProps) {
return (
<Caption textTransform="bold" color="burgundy" asChild>

View File

@@ -1,8 +1,9 @@
import LinkChip from "./Chip"
import { LinkChipsProps } from "./linkChips"
import styles from "./linkChips.module.css"
import type { LinkChipsProps } from "./linkChips"
export default function LinkChips({ chips }: LinkChipsProps) {
if (!chips.length) {
return null

View File

@@ -1,4 +1,4 @@
import { LinkChipProps } from "./Chip/chip"
import type { LinkChipProps } from "./Chip/chip"
export interface LinkChipsProps {
chips: LinkChipProps[]

View File

@@ -11,8 +11,8 @@ import {
contentSchema as blockContentSchema,
} from "../schemas/blocks/content"
import {
dynamicContentSchema as blockDynamicContentSchema,
dynamicContentRefsSchema,
dynamicContentSchema as blockDynamicContentSchema,
} from "../schemas/blocks/dynamicContent"
import {
shortcutsRefsSchema,
@@ -21,6 +21,10 @@ import {
import { textColsRefsSchema, textColsSchema } from "../schemas/blocks/textCols"
import { uspGridRefsSchema, uspGridSchema } from "../schemas/blocks/uspGrid"
import { tempImageVaultAssetSchema } from "../schemas/imageVault"
import {
linkAndTitleSchema,
linkConnectionRefs,
} from "../schemas/linkConnection"
import {
contentRefsSchema as sidebarContentRefsSchema,
contentSchema as sidebarContentSchema,
@@ -32,18 +36,7 @@ import {
} from "../schemas/sidebar/joinLoyaltyContact"
import { systemSchema } from "../schemas/system"
import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks"
import { ContentPageEnum } from "@/types/enums/contentPage"
import {
linkAndTitleSchema,
linkConnectionRefs,
} from "../schemas/linkConnection"
const linkUnionSchema = z.discriminatedUnion("__typename", [
pageLinks.contentPageSchema,
pageLinks.hotelPageSchema,
pageLinks.loyaltyPageSchema,
])
// Block schemas
export const contentPageCards = z
@@ -127,7 +120,10 @@ const navigationLinksSchema = z
return data
.filter((item) => !!item.link)
.map((item) => ({ url: item.link.url, title: item.title }))
.map((item) => ({
url: item.link!.url,
title: item.title || item.link!.title,
}))
})
// Content Page Schema and types

View File

@@ -1,7 +1,5 @@
import { z } from "zod"
import { discriminatedUnion } from "@/lib/discriminatedUnion"
import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks"