Fix docker

This commit is contained in:
diyaa
2026-03-13 04:01:58 +01:00
parent c9e9ae6b90
commit 2b5e91377c
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -20,5 +20,5 @@ export default function HomePage({ params }: { params: { locale: string } }) {
const locale = params.locale as Locale; const locale = params.locale as Locale;
const dictionary = getDictionary(locale); const dictionary = getDictionary(locale);
return <HeroSection locale={locale} home={dictionary.home} common={dictionary.common} />; return <HeroSection locale={locale} home={dictionary.home} />;
} }
+2 -3
View File
@@ -1,15 +1,14 @@
import Link from "next/link"; 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 type { Locale } from "@/lib/i18n";
import { getEmailHref, getModeValue, isComingSoonMode } from "@/lib/site"; import { getEmailHref, getModeValue, isComingSoonMode } from "@/lib/site";
type HeroSectionProps = { type HeroSectionProps = {
locale: Locale; locale: Locale;
home: HomeContent; 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 activeHome: HomeVariantContent = getModeValue(home);
const emailHref = getEmailHref(); const emailHref = getEmailHref();
+5 -1
View File
@@ -60,8 +60,12 @@ export function isComingSoonMode(): boolean {
return getSiteMode() === "coming-soon"; return getSiteMode() === "coming-soon";
} }
function getModeVariantKey(mode: SiteMode): keyof ModeVariants<unknown> {
return mode === "coming-soon" ? "comingSoon" : "full";
}
export function getModeValue<T>(variants: ModeVariants<T>): T { export function getModeValue<T>(variants: ModeVariants<T>): T {
return variants[getSiteMode()]; return variants[getModeVariantKey(getSiteMode())];
} }
export function getLocalizedPath(pathname: string, locale: "ar" | "en"): string { export function getLocalizedPath(pathname: string, locale: "ar" | "en"): string {