update content
This commit is contained in:
@@ -20,7 +20,12 @@ import { Coaches } from '@/components/coaches/Coaches'
|
||||
type Props = CollectionEntry<'pages'>['data']
|
||||
|
||||
const { lang } = Astro.params
|
||||
const [page, coaches] = await Promise.all([getEntry('pages', 'main'), getCollection('coaches')])
|
||||
const [page, coaches] = await Promise.all([
|
||||
getEntry('pages', 'main'),
|
||||
getCollection('coaches').then((coaches) =>
|
||||
coaches.sort((a, b) => (a.data.order ?? -1) - (b.data.order ?? -1))
|
||||
),
|
||||
])
|
||||
const { slider, services, hero, marquee, reviews, footer } = page?.data || {}
|
||||
const optimizedSlider = slider
|
||||
? await optimizeSliderImages(slider.map(({ image, imageAlt }) => ({ src: image, alt: imageAlt })))
|
||||
|
||||
Reference in New Issue
Block a user