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

@@ -22,7 +22,7 @@ export const CharachteristicCard: React.FC<Props> = ({ title, description, price
<div className="flex flex-col gap-2">
<h4>{title}</h4>
{description && (
<span dangerouslySetInnerHTML={{ __html: textEllipsis(description, 120)}} />
<span dangerouslySetInnerHTML={{ __html: textEllipsis(description, 240)}} />
)}
</div>
<div className="flex flex-col gap-4">

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
},

View File

@@ -2,7 +2,7 @@
import { useTranslations } from '@/i18n/utils'
import BaseLayout from '../layouts/BaseLayout.astro'
import Section from '@/components/Section.astro'
import Header, { type HeaderProps } from '@/components/header/Header.astro'
import Header from '@/components/header/Header.astro'
import Footer from '@/components/Footer.astro'
import type { CollectionEntry } from 'astro:content'