udpate for coming soon
This commit is contained in:
+21
-10
@@ -1,6 +1,7 @@
|
||||
import Link from "next/link";
|
||||
import type { CommonContent, HomeContent } from "@/content/types";
|
||||
import type { CommonContent, HomeContent, HomeVariantContent } from "@/content/types";
|
||||
import type { Locale } from "@/lib/i18n";
|
||||
import { getEmailHref, isComingSoonMode } from "@/lib/site";
|
||||
|
||||
type HeroSectionProps = {
|
||||
locale: Locale;
|
||||
@@ -9,23 +10,33 @@ type HeroSectionProps = {
|
||||
};
|
||||
|
||||
export default function HeroSection({ locale, home, common }: HeroSectionProps) {
|
||||
const activeHome: HomeVariantContent = isComingSoonMode() ? home.comingSoon : home.full;
|
||||
const emailHref = getEmailHref();
|
||||
|
||||
return (
|
||||
<section className="hero panel">
|
||||
<p className="eyebrow">{home.kicker}</p>
|
||||
<h1>{home.title}</h1>
|
||||
<p className="lead">{home.description}</p>
|
||||
<p className="availability-badge">{activeHome.badge}</p>
|
||||
<p className="eyebrow">{activeHome.kicker}</p>
|
||||
<h1>{activeHome.title}</h1>
|
||||
<p className="lead">{activeHome.description}</p>
|
||||
|
||||
<div className="cta-row">
|
||||
<Link href={`/${locale}/contact`} className="cta-btn">
|
||||
{home.primaryCta}
|
||||
</Link>
|
||||
<Link href={`/${locale}/about`} className="ghost-btn">
|
||||
{common.nav.about}
|
||||
{emailHref ? (
|
||||
<a href={emailHref} className="cta-btn">
|
||||
{activeHome.primaryCta}
|
||||
</a>
|
||||
) : (
|
||||
<span className="cta-btn is-disabled" aria-disabled="true">
|
||||
{activeHome.primaryCta}
|
||||
</span>
|
||||
)}
|
||||
<Link href={isComingSoonMode() ? `/${locale}` : `/${locale}/about`} className="ghost-btn">
|
||||
{activeHome.secondaryCta}
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="stat-grid">
|
||||
{home.highlights.map((item) => (
|
||||
{activeHome.highlights.map((item) => (
|
||||
<article key={item.label} className="stat-card">
|
||||
<span className="stat-value">{item.value}</span>
|
||||
<span className="stat-label">{item.label}</span>
|
||||
|
||||
Reference in New Issue
Block a user