Fix docker
This commit is contained in:
parent
c9e9ae6b90
commit
2b5e91377c
@ -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();
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user