From c9e9ae6b90456d345de3d73fee81517b14da88d2 Mon Sep 17 00:00:00 2001 From: diyaa Date: Fri, 13 Mar 2026 03:56:40 +0100 Subject: [PATCH] Fix runttime --- components/HeroSection.tsx | 4 ++-- components/SiteFooter.tsx | 4 +++- components/SiteHeader.tsx | 5 +++-- content/ar.ts | 27 ++++++++++++++++++++------- content/en.ts | 27 ++++++++++++++++++++------- content/types.ts | 29 ++++++++++++++++++----------- lib/metadata.ts | 8 ++++---- lib/site.ts | 6 +++++- 8 files changed, 75 insertions(+), 35 deletions(-) diff --git a/components/HeroSection.tsx b/components/HeroSection.tsx index e10cafb..8c34948 100644 --- a/components/HeroSection.tsx +++ b/components/HeroSection.tsx @@ -1,7 +1,7 @@ import Link from "next/link"; import type { CommonContent, HomeContent, HomeVariantContent } from "@/content/types"; import type { Locale } from "@/lib/i18n"; -import { getEmailHref, isComingSoonMode } from "@/lib/site"; +import { getEmailHref, getModeValue, isComingSoonMode } from "@/lib/site"; type HeroSectionProps = { locale: Locale; @@ -10,7 +10,7 @@ type HeroSectionProps = { }; export default function HeroSection({ locale, home, common }: HeroSectionProps) { - const activeHome: HomeVariantContent = isComingSoonMode() ? home.comingSoon : home.full; + const activeHome: HomeVariantContent = getModeValue(home); const emailHref = getEmailHref(); return ( diff --git a/components/SiteFooter.tsx b/components/SiteFooter.tsx index 3fbf051..ace5850 100644 --- a/components/SiteFooter.tsx +++ b/components/SiteFooter.tsx @@ -1,5 +1,6 @@ import type { Locale } from "@/lib/i18n"; import type { CommonContent } from "@/content/types"; +import { getModeValue } from "@/lib/site"; type SiteFooterProps = { locale: Locale; @@ -8,13 +9,14 @@ type SiteFooterProps = { export default function SiteFooter({ locale, common }: SiteFooterProps) { const year = new Date().getFullYear(); + const commonVariant = getModeValue(common.variants); return (