Files
topsysops-app/public-site/components/sections/Cases.jsx
T
ogrechkoandClaude Sonnet 5 f53c8b1ed7 Fix missing H1 on list-style pages via SectionHeading template
SectionHeading always rendered its title as <h2>, so every page whose
only heading came from a shared section component (services hub,
promotions, cases, faq, contact, reviews, blog list) had no <h1> at
all. Add a level prop (default h2) and pass headingLevel="h1" from
each page where that section is the page's own top-level heading.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013otXCiTZsxdZ4SJKZ9wUky
2026-08-26 00:00:24 +03:00

51 lines
2.2 KiB
React
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Link from 'next/link';
import Reveal from '../Reveal.jsx';
import SectionHeading from '../SectionHeading.jsx';
import StatusDot from '../StatusDot.jsx';
export default function Cases({ cases, limit, moreHref, showDisclaimer = false, headingLevel = 'h2' }) {
if (cases.length === 0) return null;
const list = limit ? cases.slice(0, limit) : cases;
return (
<section id="cases" className="max-w-6xl mx-auto px-5 sm:px-8 py-20">
<SectionHeading eyebrow="cases --log" title="Кейсы и портфолио" level={headingLevel} />
<div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-5">
{list.map((c, i) => (
<Reveal key={c.id} delay={i * 60}>
<div className="h-full rounded-lg border p-5 bg-white border-slate-200 dark:bg-slate-900 dark:border-slate-800">
<div className="flex items-center justify-between mb-3">
{c.tag && (
<span className="text-xs px-2 py-0.5 rounded-full bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-300">
{c.tag}
</span>
)}
<StatusDot tone={c.tone} label={c.status} mono />
</div>
<h3 className="font-bold mb-2 font-display text-[15px]">{c.title}</h3>
<p className="text-sm text-slate-600 dark:text-slate-400">{c.description}</p>
</div>
</Reveal>
))}
</div>
{moreHref && (
<Reveal className="mt-8">
<Link href={moreHref} className="text-sm text-emerald-500 font-medium hover:underline">
Все кейсы →
</Link>
</Reveal>
)}
{showDisclaimer && (
<Reveal className="mt-8">
<p className="text-xs text-slate-400 dark:text-slate-500">
* Показатели по срокам, объёмам и улучшениям — ориентировочные оценки по внутренним данным, точные цифры
уточняются и согласовываются с клиентом по каждому проекту.
</p>
</Reveal>
)}
</section>
);
}