fix services
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user