Skip to content

Commit

Permalink
Merge branch 'bose/2692' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
BorghildSelle committed Nov 26, 2024
2 parents 5b66f71 + 174c702 commit d2d19b5
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions web/templates/newsroom/sanity/NewsroomSanity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const NewsRoomTemplateSanity = forwardRef<HTMLElement, NewsRoomTemplateProps>(fu
localNewsPages,
fallbackImages,
} = pageData || {}

console.log('localNewsPages', localNewsPages)
const intl = useIntl()
const router = useRouter()
const { locale } = router
Expand Down Expand Up @@ -116,10 +118,10 @@ const NewsRoomTemplateSanity = forwardRef<HTMLElement, NewsRoomTemplateProps>(fu
<main ref={ref} className="">
<div className="flex flex-col gap-8 lg:gap-12">
<div className="bg-slate-blue-95 dark py-24">
<div className="flex flex-col gap-4 grid-rows-2 mx-auto px-layout-sm max-w-viewport">
{title && <Heading value={title} as="h1" variant="h2" />}
<div className="flex flex-col gap-4 lg:grid lg:grid-cols-2 lg:grid-rows-[auto_1fr] mx-auto px-layout-sm max-w-viewport">
{title && <Heading value={title} as="h1" variant="h2" className="lg:col-span-2" />}
{ingress && <Blocks value={ingress} />}
<div className="w-full flex flex-col gap-8 lg:flex-row lg:justify-between items-center">
<div className="w-full flex flex-col gap-8 items-center">
<List
role="navigation"
className="max-lg:w-full"
Expand All @@ -139,9 +141,13 @@ const NewsRoomTemplateSanity = forwardRef<HTMLElement, NewsRoomTemplateProps>(fu
{localNewsPages &&
localNewsPages?.length > 0 &&
localNewsPages?.map((localNewsPage) => {
return localNewsPage?.link?.slug ? (
return localNewsPage?.link?.slug || localNewsPage?.href ? (
<List.Item key={localNewsPage.id} className="w-full">
<ResourceLink type={localNewsPage.type} href={localNewsPage?.link?.slug} className="w-full">
<ResourceLink
type={localNewsPage.type}
href={localNewsPage?.link?.slug || (localNewsPage?.href as string)}
className="w-full"
>
{localNewsPage?.label}
</ResourceLink>
</List.Item>
Expand Down

0 comments on commit d2d19b5

Please sign in to comment.