fix: get locale from page connection
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { Edges } from "../utils/edges"
|
||||
import type { ExternalLink } from "../utils/externalLink"
|
||||
import type { TempPageLink } from "../utils/tempPageLink"
|
||||
import type { PageLink } from "../utils/pageLink"
|
||||
import { Typename } from "../utils/typename"
|
||||
|
||||
@@ -36,7 +36,7 @@ type InternalLinkListItem = Typename<
|
||||
link_text?: string
|
||||
list_item_style: ListItemStyle
|
||||
subtitle?: string
|
||||
pageConnection: Edges<ExternalLink | PageLink>
|
||||
pageConnection: Edges<TempPageLink | PageLink>
|
||||
}
|
||||
},
|
||||
BlockListItemsEnum.CurrentBlocksPageBlocksListBlockListItemsListItemInternalLink
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import type { SysAsset } from "./utils/asset"
|
||||
import type { ExternalLinkType } from "./utils/externalLink"
|
||||
import type { TempPageLinkType } from "./utils/tempPageLink"
|
||||
import type { PageLinkType } from "./utils/pageLink"
|
||||
|
||||
export type Embeds =
|
||||
| ExternalLinkType
|
||||
| PageLinkType
|
||||
| SysAsset
|
||||
export type Embeds = TempPageLinkType | PageLinkType | SysAsset
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Image } from "../image"
|
||||
import type { Edges } from "./utils/edges"
|
||||
import type { Embeds } from "./embeds"
|
||||
import type { ExternalLink } from "./utils/externalLink"
|
||||
import type { TempPageLink } from "./utils/tempPageLink"
|
||||
import type { PageLink } from "./utils/pageLink"
|
||||
import type { RTEDocument } from "../rte/node"
|
||||
|
||||
@@ -13,7 +13,7 @@ export type Puff = {
|
||||
title: string
|
||||
}
|
||||
link_text?: string
|
||||
pageConnection: Edges<ExternalLink | PageLink>
|
||||
pageConnection: Edges<TempPageLink | PageLink>
|
||||
system: {
|
||||
uid: string
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { Lang } from "@/types/lang"
|
||||
import type { EmbedEnum } from "./embeds"
|
||||
import type { Typename } from "./typename"
|
||||
|
||||
export type PageLink = {
|
||||
system: {
|
||||
uid: string
|
||||
locale: Lang
|
||||
}
|
||||
title: string
|
||||
url: string
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { Lang } from "@/types/lang"
|
||||
import type { EmbedEnum } from "./embeds"
|
||||
import type { Typename } from "./typename"
|
||||
|
||||
export type ExternalLink = {
|
||||
export type TempPageLink = {
|
||||
system: {
|
||||
uid: string
|
||||
locale: Lang
|
||||
}
|
||||
title: string
|
||||
url: string
|
||||
}
|
||||
|
||||
export type ExternalLinkType = Typename<ExternalLink, EmbedEnum.TempPage>
|
||||
export type TempPageLinkType = Typename<TempPageLink, EmbedEnum.TempPage>
|
||||
Reference in New Issue
Block a user