---
import WhatsAppButton from '@components/base/WhatsAppButton.astro'
import TechStack from '@components/home/TechStack.astro'
import HeroImage from '@components/home/HeroImage.astro'
import { pb } from '@lib/pocketbase';
interface HeroData {
id: string;
title: string;
subtitle: string;
tech_title: string;
whatsapp_phone_number: string;
btn_text: string;
frontend_tech: string[];
backend_tech: string[];
is_active: boolean;
[key: string]: any; // для остальных полей
}
const result = await pb.collection('home_hero').getList(1, 1, {
filter: 'is_active = true',
sort: '-created'
});
const heroData: HeroData = {
...result.items[0],
id: result.items[0].id,
title: result.items[0].title,
subtitle: result.items[0].subtitle,
tech_title: result.items[0].tech_title,
whatsapp_phone_number: result.items[0].whatsapp_phone_number,
btn_text: result.items[0].btn_text,
frontend_tech: result.items[0].frontend_tech || [],
backend_tech: result.items[0].backend_tech || [],
is_active: result.items[0].is_active
};
---