Merged in feat/footer (pull request #11)
Feat/footer * chore: correct type * fix: remove redundant return type * chore: align code formatting * chore: format code to avoid diffing noise * chore: clean up format diffing noise * chore: move props tying to types folder * fix: update app_downloads usage and types * fix: improve footer query and typings * refactor: add Image.graphql * fix: correct typings
This commit is contained in:
committed by
Simon.Emanuelsson
parent
7926568eae
commit
2bd4e25403
5
types/components/current/footer.ts
Normal file
5
types/components/current/footer.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { NavigationItem } from "@/types/requests/footer"
|
||||
|
||||
export type FooterNavigationProps = {
|
||||
linkGroups: NavigationItem[]
|
||||
}
|
||||
@@ -8,12 +8,7 @@ export type Text = {
|
||||
text: {
|
||||
content: {
|
||||
json: RTERootObject
|
||||
embedded_itemsConnection: Edges<
|
||||
| ExternalLink
|
||||
| PageLink
|
||||
| SysAsset
|
||||
>
|
||||
embedded_itemsConnection: Edges<ExternalLink | PageLink | SysAsset>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
71
types/requests/footer.ts
Normal file
71
types/requests/footer.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import type { AllRequestResponse } from "./utils/all"
|
||||
import type { Edges } from "./utils/edges"
|
||||
import { Asset } from "./utils/asset"
|
||||
import { PageLink } from "./utils/pageLink"
|
||||
|
||||
type AppDownloadLink = {
|
||||
title: string
|
||||
url: string
|
||||
}
|
||||
|
||||
type AppDownload = {
|
||||
href: string
|
||||
imageConnection: Edges<Asset>
|
||||
}
|
||||
|
||||
export type InternalLink = {
|
||||
__typename: "FooterNavigationLinksInternalLink"
|
||||
internal_link: {
|
||||
link_text: string
|
||||
pageConnection: Edges<PageLink>
|
||||
}
|
||||
}
|
||||
|
||||
export type ExternalLink = {
|
||||
__typename: "FooterNavigationLinksExternalLink"
|
||||
external_link: {
|
||||
link: {
|
||||
href: string
|
||||
title: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type NavigationItem = {
|
||||
links: (ExternalLink | InternalLink)[]
|
||||
title: string
|
||||
}
|
||||
|
||||
type SocialMedium = {
|
||||
href: string
|
||||
title: string
|
||||
}
|
||||
|
||||
export type Footer = {
|
||||
title: string
|
||||
about: {
|
||||
title: string
|
||||
text: string
|
||||
}
|
||||
app_downloads: {
|
||||
title: string
|
||||
app_store: AppDownload
|
||||
google_play: AppDownload
|
||||
}
|
||||
logoConnection: Edges<Asset>
|
||||
navigation: NavigationItem[]
|
||||
social_media: {
|
||||
title: string
|
||||
facebook: SocialMedium
|
||||
instagram: SocialMedium
|
||||
twitter: SocialMedium
|
||||
}
|
||||
trip_advisor: {
|
||||
title: string
|
||||
logoConnection: Edges<Asset>
|
||||
}
|
||||
}
|
||||
|
||||
export type GetFooterData = {
|
||||
all_footer: AllRequestResponse<Footer>
|
||||
}
|
||||
Reference in New Issue
Block a user