import Link from 'next/link'; import { ArrowRight } from 'lucide-react'; import Header from '../components/Header.jsx'; import Footer from '../components/Footer.jsx'; import Hero from '../components/sections/Hero.jsx'; import AccountPromo from '../components/sections/AccountPromo.jsx'; import Promotions from '../components/sections/Promotions.jsx'; import Services from '../components/sections/Services.jsx'; import Cases from '../components/sections/Cases.jsx'; import Reviews from '../components/sections/Reviews.jsx'; import Contact from '../components/sections/Contact.jsx'; import Reveal from '../components/Reveal.jsx'; import SectionHeading from '../components/SectionHeading.jsx'; import { serverApi } from '../lib/serverApi.js'; export const metadata = { alternates: { canonical: '/' }, }; export default async function HomePage() { const [services, promotions, reviews, cases, contact] = await Promise.all([ serverApi.getServices(), serverApi.getPromotions(), serverApi.getReviews(), serverApi.getCases(), serverApi.getContact(), ]); const business = { '@context': 'https://schema.org', '@type': 'LocalBusiness', '@id': `${process.env.NEXT_PUBLIC_SITE_URL || 'https://top-sysops.ru'}/#organization`, name: 'TopSysOps', url: process.env.NEXT_PUBLIC_SITE_URL || 'https://top-sysops.ru', ...(contact?.address ? { address: { '@type': 'PostalAddress', streetAddress: contact.address, addressCountry: 'RU' } } : {}), ...(contact?.phone ? { telephone: contact.phone } : {}), ...(contact?.email ? { email: contact.email } : {}), ...(reviews.length > 0 ? { aggregateRating: { '@type': 'AggregateRating', ratingValue: (reviews.reduce((sum, r) => sum + r.rating, 0) / reviews.length).toFixed(1), reviewCount: reviews.length, }, } : {}), ...(services.length > 0 ? { hasOfferCatalog: { '@type': 'OfferCatalog', name: 'Услуги TopSysOps', itemListElement: services.flatMap((cat) => cat.items.map((it) => ({ '@type': 'Offer', itemOffered: { '@type': 'Service', name: it.name, description: it.note || cat.description }, })) ), }, } : {}), }; return (