Fix runttime

This commit is contained in:
diyaa
2026-03-13 03:56:40 +01:00
parent d1ed5c641b
commit c9e9ae6b90
8 changed files with 75 additions and 35 deletions
+2 -2
View File
@@ -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 (
+3 -1
View File
@@ -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 (
<footer className="site-footer">
<div className="container footer-content">
<div className="footer-copy">
<p>{common.footerRights.replace("{year}", String(year))}</p>
<p>{common.footerBuiltWith}</p>
<p>{commonVariant.footerBuiltWith}</p>
</div>
<p className="locale-badge">{locale.toUpperCase()}</p>
</div>
+3 -2
View File
@@ -3,7 +3,7 @@ import LanguageSwitcher from "@/components/LanguageSwitcher";
import ThemeToggle from "@/components/ThemeToggle";
import type { Locale } from "@/lib/i18n";
import type { CommonContent } from "@/content/types";
import { isComingSoonMode } from "@/lib/site";
import { getModeValue, isComingSoonMode } from "@/lib/site";
type SiteHeaderProps = {
locale: Locale;
@@ -12,6 +12,7 @@ type SiteHeaderProps = {
export default function SiteHeader({ locale, common }: SiteHeaderProps) {
const isComingSoon = isComingSoonMode();
const commonVariant = getModeValue(common.variants);
return (
<header className="site-header">
@@ -20,7 +21,7 @@ export default function SiteHeader({ locale, common }: SiteHeaderProps) {
<Link href={`/${locale}`} className="brand">
{common.siteTitle}
</Link>
<span className="brand-tagline">{common.siteTagline}</span>
<span className="brand-tagline">{commonVariant.siteTagline}</span>
</div>
{!isComingSoon ? (