feat(SW-186): implemented queries and typings for menu inside header query
This commit is contained in:
@@ -14,12 +14,13 @@ export function makeLinkObjectFromInternalExternalLink(
|
||||
const isExternalLink = data.is_external_link && data.external_link.href
|
||||
const isOriginalLink = linkConnectionNode?.web?.original_url
|
||||
const externalLink = data.external_link
|
||||
const href = isExternalLink
|
||||
? externalLink.href
|
||||
: linkConnectionNode?.web?.original_url ||
|
||||
removeMultipleSlashes(
|
||||
`/${linkConnectionNode.system.locale}/${linkConnectionNode.url}`
|
||||
)
|
||||
const href =
|
||||
isExternalLink || !linkConnectionNode
|
||||
? externalLink.href
|
||||
: linkConnectionNode.web?.original_url ||
|
||||
removeMultipleSlashes(
|
||||
`/${linkConnectionNode.system.locale}/${linkConnectionNode.url}`
|
||||
)
|
||||
const title = isExternalLink ? externalLink.title : data.page_link.link_title
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user