update content

This commit is contained in:
Salam-vsem
2025-05-17 15:05:42 +03:00
parent e13a35f1dd
commit 0efc8289ea
15 changed files with 28 additions and 13 deletions

View File

@@ -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 })))