feat(landing): get title from cms
This commit is contained in:
@@ -13,7 +13,10 @@ const [siteResult, menuItemsResult] = await Promise.all([siteConfigQuery.execute
|
||||
if (siteResult.errors?.length) {
|
||||
throw new Error(siteResult.errors.map(e => e.message).join(', '))
|
||||
}
|
||||
const contacts = siteResult.data?.siteConfig?.contacts?.filter(c => c != null) ?? []
|
||||
const siteConfig = siteResult.data?.siteConfig
|
||||
const siteTitle = siteConfig?.title ?? ''
|
||||
const siteDescription = siteConfig?.description ?? ''
|
||||
const contacts = siteConfig?.contacts?.filter(c => c != null) ?? []
|
||||
if (menuItemsResult.errors?.length) {
|
||||
throw new Error(menuItemsResult.errors.map(e => e.message).join(', '))
|
||||
}
|
||||
@@ -51,10 +54,13 @@ const vendors = (category.vendors?.filter(v => v != null) ?? []).map(vendor => (
|
||||
}))
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<Layout
|
||||
title={title ? `${title} | ${siteTitle}` : siteTitle}
|
||||
description={description ?? siteDescription}
|
||||
>
|
||||
<div class="min-h-screen bg-white w-full overflow-x-hidden">
|
||||
<Header client:load contacts={contacts} solutions={solutionCategories} services={serviceCategories} />
|
||||
<Header client:load siteTitle={siteTitle} contacts={contacts} solutions={solutionCategories} services={serviceCategories} />
|
||||
<CategoryView client:load badge={badge} title={title} description={description} vendors={vendors} contacts={contacts} />
|
||||
<Footer client:load contacts={contacts} solutionCategories={solutionCategories} />
|
||||
<Footer client:load siteTitle={siteTitle} contacts={contacts} solutionCategories={solutionCategories} />
|
||||
</div>
|
||||
</Layout>
|
||||
|
||||
Reference in New Issue
Block a user