diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx index 0a26b45..d6d75e7 100644 --- a/app/[locale]/page.tsx +++ b/app/[locale]/page.tsx @@ -20,5 +20,5 @@ export default function HomePage({ params }: { params: { locale: string } }) { const locale = params.locale as Locale; const dictionary = getDictionary(locale); - return ; + return ; } diff --git a/components/HeroSection.tsx b/components/HeroSection.tsx index 8c34948..e9865a8 100644 --- a/components/HeroSection.tsx +++ b/components/HeroSection.tsx @@ -1,15 +1,14 @@ import Link from "next/link"; -import type { CommonContent, HomeContent, HomeVariantContent } from "@/content/types"; +import type { HomeContent, HomeVariantContent } from "@/content/types"; import type { Locale } from "@/lib/i18n"; import { getEmailHref, getModeValue, isComingSoonMode } from "@/lib/site"; type HeroSectionProps = { locale: Locale; home: HomeContent; - common: CommonContent; }; -export default function HeroSection({ locale, home, common }: HeroSectionProps) { +export default function HeroSection({ locale, home }: HeroSectionProps) { const activeHome: HomeVariantContent = getModeValue(home); const emailHref = getEmailHref(); diff --git a/lib/site.ts b/lib/site.ts index aa49a85..9b100e0 100644 --- a/lib/site.ts +++ b/lib/site.ts @@ -60,8 +60,12 @@ export function isComingSoonMode(): boolean { return getSiteMode() === "coming-soon"; } +function getModeVariantKey(mode: SiteMode): keyof ModeVariants { + return mode === "coming-soon" ? "comingSoon" : "full"; +} + export function getModeValue(variants: ModeVariants): T { - return variants[getSiteMode()]; + return variants[getModeVariantKey(getSiteMode())]; } export function getLocalizedPath(pathname: string, locale: "ar" | "en"): string {