fix(SW-368): import type fixes
This commit is contained in:
@@ -3,10 +3,10 @@ import Link from "next/link"
|
|||||||
import { ChevronRightSmallIcon } from "@/components/Icons"
|
import { ChevronRightSmallIcon } from "@/components/Icons"
|
||||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||||
|
|
||||||
import { LinkChipProps } from "./chip"
|
|
||||||
|
|
||||||
import styles from "./chip.module.css"
|
import styles from "./chip.module.css"
|
||||||
|
|
||||||
|
import type { LinkChipProps } from "./chip"
|
||||||
|
|
||||||
export default function LinkChip({ url, title }: LinkChipProps) {
|
export default function LinkChip({ url, title }: LinkChipProps) {
|
||||||
return (
|
return (
|
||||||
<Caption textTransform="bold" color="burgundy" asChild>
|
<Caption textTransform="bold" color="burgundy" asChild>
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import LinkChip from "./Chip"
|
import LinkChip from "./Chip"
|
||||||
import { LinkChipsProps } from "./linkChips"
|
|
||||||
|
|
||||||
import styles from "./linkChips.module.css"
|
import styles from "./linkChips.module.css"
|
||||||
|
|
||||||
|
import type { LinkChipsProps } from "./linkChips"
|
||||||
|
|
||||||
export default function LinkChips({ chips }: LinkChipsProps) {
|
export default function LinkChips({ chips }: LinkChipsProps) {
|
||||||
if (!chips.length) {
|
if (!chips.length) {
|
||||||
return null
|
return null
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { LinkChipProps } from "./Chip/chip"
|
import type { LinkChipProps } from "./Chip/chip"
|
||||||
|
|
||||||
export interface LinkChipsProps {
|
export interface LinkChipsProps {
|
||||||
chips: LinkChipProps[]
|
chips: LinkChipProps[]
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import {
|
|||||||
contentSchema as blockContentSchema,
|
contentSchema as blockContentSchema,
|
||||||
} from "../schemas/blocks/content"
|
} from "../schemas/blocks/content"
|
||||||
import {
|
import {
|
||||||
dynamicContentSchema as blockDynamicContentSchema,
|
|
||||||
dynamicContentRefsSchema,
|
dynamicContentRefsSchema,
|
||||||
|
dynamicContentSchema as blockDynamicContentSchema,
|
||||||
} from "../schemas/blocks/dynamicContent"
|
} from "../schemas/blocks/dynamicContent"
|
||||||
import {
|
import {
|
||||||
shortcutsRefsSchema,
|
shortcutsRefsSchema,
|
||||||
@@ -21,6 +21,10 @@ import {
|
|||||||
import { textColsRefsSchema, textColsSchema } from "../schemas/blocks/textCols"
|
import { textColsRefsSchema, textColsSchema } from "../schemas/blocks/textCols"
|
||||||
import { uspGridRefsSchema, uspGridSchema } from "../schemas/blocks/uspGrid"
|
import { uspGridRefsSchema, uspGridSchema } from "../schemas/blocks/uspGrid"
|
||||||
import { tempImageVaultAssetSchema } from "../schemas/imageVault"
|
import { tempImageVaultAssetSchema } from "../schemas/imageVault"
|
||||||
|
import {
|
||||||
|
linkAndTitleSchema,
|
||||||
|
linkConnectionRefs,
|
||||||
|
} from "../schemas/linkConnection"
|
||||||
import {
|
import {
|
||||||
contentRefsSchema as sidebarContentRefsSchema,
|
contentRefsSchema as sidebarContentRefsSchema,
|
||||||
contentSchema as sidebarContentSchema,
|
contentSchema as sidebarContentSchema,
|
||||||
@@ -32,18 +36,7 @@ import {
|
|||||||
} from "../schemas/sidebar/joinLoyaltyContact"
|
} from "../schemas/sidebar/joinLoyaltyContact"
|
||||||
import { systemSchema } from "../schemas/system"
|
import { systemSchema } from "../schemas/system"
|
||||||
|
|
||||||
import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks"
|
|
||||||
import { ContentPageEnum } from "@/types/enums/contentPage"
|
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
|
// Block schemas
|
||||||
export const contentPageCards = z
|
export const contentPageCards = z
|
||||||
@@ -127,7 +120,10 @@ const navigationLinksSchema = z
|
|||||||
|
|
||||||
return data
|
return data
|
||||||
.filter((item) => !!item.link)
|
.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
|
// Content Page Schema and types
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import { discriminatedUnion } from "@/lib/discriminatedUnion"
|
import { discriminatedUnion } from "@/lib/discriminatedUnion"
|
||||||
import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks"
|
import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user