fix services

This commit is contained in:
Yuu Ottosoka
2026-03-30 23:44:12 +03:00
parent 30e2091ded
commit 6ca7bd8b3e
3 changed files with 3 additions and 6 deletions

View File

@@ -3,8 +3,6 @@ import type { z } from 'astro/zod'
import { YCLIENTS_TOKEN, YCLIENTS_API_URL } from 'astro:env/server'
type HTML = string
const currencyFormatter = Intl.NumberFormat('ru', { currency: 'rub' })
// const RENT_GYM_SERVICE: z.infer<typeof servicesSchema> = {
// title: 'Аренда зала',
// charachteristics: [
@@ -81,14 +79,13 @@ export const yclientsClient = {
.filter((service) => service.category_id === categoryItem.id)
.map((service) => ({
title: service.title,
price: `${currencyFormatter.format(service.price_min)} ₽`,
description: service.comment,
link: {
title: 'Записаться',
href: `https://n1381542.yclients.com/company/1254211/personal/select-services?o=s${service.id}`,
},
})),
}))
})).filter(item => item.charachteristics.length > 0)
return services
},