"use client";
import Image from "next/image";
import { useTranslations } from "next-intl";

export default function HeroPressImage({
  image,
  title,
}: {
  image: string | null;
  title: string | null;
}) {
  const t = useTranslations("PressDetailsPage.heroImage");

  return (
    <section className="relative w-full h-[40vh] overflow-hidden">
      <Image
        src={image || "/images/press-details.jpg"}
        alt={title || t("alt")}
        fill
        className="object-cover"
        priority
      />
    </section>
  );
}
