"use client"; import { useState } from "react"; import Link from "next/link"; import Image from "next/image"; export default function StorefrontFooter({ brandName, brandSlug, logoUrl, logoUrlDark, customFooterText, contactEmail, contactPhone, isAdmin, brandAccent = "green", }: { brandName: string; brandSlug: string; logoUrl?: string | null; logoUrlDark?: string | null; customFooterText?: string | null; contactEmail?: string | null; contactPhone?: string | null; isAdmin?: boolean; brandAccent?: "green" | "orange" | "blue"; }) { // The copyright year is computed exactly once via a lazy initializer. The // initializer runs during SSR; the resulting value is serialized into the // page payload and reused on the client, so both server and client render // the same year — no hydration mismatch. (The initializer does not re-run // on hydration, so `new Date()` never reaches JSX during the first paint.) const [year] = useState(() => new Date().getFullYear()); const accentClass = brandAccent === "orange" ? "text-orange-500 hover:text-orange-600" : brandAccent === "blue" ? "text-blue-500 hover:text-blue-600" : "text-emerald-600 hover:text-emerald-700"; const subscribeBtnClass = brandAccent === "blue" ? "bg-blue-600 hover:bg-blue-700" : brandAccent === "orange" ? "bg-orange-600 hover:bg-orange-700" : "bg-emerald-600 hover:bg-emerald-700"; return ( <> {/* Newsletter band */}

Stay in the loop

Harvest updates, new stops & seasonal news

); }