Fix Coming soon
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import Link from "next/link";
|
||||
import ComingSoonPanel from "@/components/ComingSoonPanel";
|
||||
import type { HomeContent, HomeVariantContent } from "@/content/types";
|
||||
import type { Locale } from "@/lib/i18n";
|
||||
import { getEmailHref, getModeValue, isComingSoonMode } from "@/lib/site";
|
||||
@@ -10,8 +11,13 @@ type HeroSectionProps = {
|
||||
|
||||
export default function HeroSection({ locale, home }: HeroSectionProps) {
|
||||
const activeHome: HomeVariantContent = getModeValue(home);
|
||||
const comingSoon = isComingSoonMode();
|
||||
const emailHref = getEmailHref();
|
||||
|
||||
if (comingSoon) {
|
||||
return <ComingSoonPanel content={activeHome} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="hero panel">
|
||||
<p className="availability-badge">{activeHome.badge}</p>
|
||||
@@ -29,7 +35,7 @@ export default function HeroSection({ locale, home }: HeroSectionProps) {
|
||||
{activeHome.primaryCta}
|
||||
</span>
|
||||
)}
|
||||
<Link href={isComingSoonMode() ? `/${locale}` : `/${locale}/about`} className="ghost-btn">
|
||||
<Link href={`/${locale}/about`} className="ghost-btn">
|
||||
{activeHome.secondaryCta}
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user