Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/(frontend)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default async function Home() {
excerpt: true,
content: true,
categories: true,
authors: true,
populatedAuthors: true,
publishedAt: true,
heroImage: true,
Expand Down
47 changes: 35 additions & 12 deletions src/app/(frontend)/partners/clinics/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
} from '@/components/organisms/Landing'
import { BlogCardCollection } from '@/components/organisms/Blog/BlogCardCollection'
import {
clinicBlogData,
clinicCategoriesData,
clinicCategoryFeaturedIds,
clinicCategoryItems,
Expand All @@ -34,6 +33,9 @@ import {
landingProcessPlaceholderSubtitle,
landingProcessPlaceholderTitle,
} from '@/utilities/placeholders/landingProcess'
import { normalizePost } from '@/utilities/blog/normalizePost'
import { getPayload } from 'payload'
import configPromise from '@payload-config'

// TODO: Temporary fixtures for layout; replace with Payload data.

Expand All @@ -43,7 +45,31 @@ export const metadata: Metadata = {
'Increase your clinic’s international reach and connect with qualified patients worldwide. Our comparison platform helps clinics, medical networks, and international patient departments gain visibility, trust, and high-intent inquiries - globally and sustainably.',
}

export default function ClinicLandingPage() {
export const revalidate = 600

export default async function ClinicLandingPage() {
// Fetch latest 3 blog posts for clinic landing page
const payload = await getPayload({ config: configPromise })
const posts = await payload.find({
collection: 'posts',
depth: 1,
limit: 3,
overrideAccess: false,
select: {
title: true,
slug: true,
excerpt: true,
categories: true,
authors: true,
populatedAuthors: true,
publishedAt: true,
heroImage: true,
},
sort: '-publishedAt',
})

const normalizedPosts = posts.docs.map(normalizePost)

return (
<main className="flex min-h-screen flex-col">
<LandingHero title={clinicHeroData.title} description={clinicHeroData.description} image={clinicHeroData.image} />
Expand Down Expand Up @@ -105,16 +131,13 @@ export default function ClinicLandingPage() {
items={clinicPartnersFaqSection.items}
defaultOpenItemId={clinicPartnersFaqSection.defaultOpenItemId}
/>
<BlogCardCollection
posts={clinicBlogData.map((p) => ({
title: p.title,
href: `/posts/${p.title.toLowerCase().replace(/\s+/g, '-')}`,
excerpt: p.excerpt,
dateLabel: p.date,
readTime: '5 Min. Lesezeit',
image: p.image ? { src: p.image, alt: p.title } : undefined,
}))}
/>
{normalizedPosts.length > 0 && (
<BlogCardCollection
title="From our blog"
intro="Explore practical insights, expert perspectives, and the latest topics across health and medicine."
posts={normalizedPosts}
/>
)}
<LandingContact
title="Kontakt"
description="Interested in gaining international patients and increasing your clinic’s global reach? Contact us to explore how your clinic can benefit from our international comparison platform."
Expand Down
1 change: 1 addition & 0 deletions src/app/(frontend)/posts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default async function Page() {
excerpt: true,
content: true,
categories: true,
authors: true,
populatedAuthors: true,
publishedAt: true,
heroImage: true,
Expand Down
1 change: 1 addition & 0 deletions src/app/(frontend)/posts/page/[pageNumber]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default async function Page({ params: paramsPromise }: Args) {
excerpt: true,
content: true,
categories: true,
authors: true,
populatedAuthors: true,
publishedAt: true,
heroImage: true,
Expand Down