Fix docker
This commit is contained in:
@@ -20,5 +20,5 @@ export default function HomePage({ params }: { params: { locale: string } }) {
|
||||
const locale = params.locale as Locale;
|
||||
const dictionary = getDictionary(locale);
|
||||
|
||||
return <HeroSection locale={locale} home={dictionary.home} common={dictionary.common} />;
|
||||
return <HeroSection locale={locale} home={dictionary.home} />;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
+5
-1
@@ -60,8 +60,12 @@ export function isComingSoonMode(): boolean {
|
||||
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 {
|
||||
return variants[getSiteMode()];
|
||||
return variants[getModeVariantKey(getSiteMode())];
|
||||
}
|
||||
|
||||
export function getLocalizedPath(pathname: string, locale: "ar" | "en"): string {
|
||||
|
||||
Reference in New Issue
Block a user