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
72 lines
1.3 KiB
TypeScript
72 lines
1.3 KiB
TypeScript
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>
|
|
}
|