Final build fix: Explicitly type motion variants and strengthen null checks

This commit is contained in:
2026-04-14 12:41:19 +03:00
parent 429495a955
commit 7d51b5eb0b

View File

@@ -3,9 +3,8 @@
import { yachts } from "../../../data/yachts";
import { notFound } from "next/navigation";
import { Link } from "@/i18n/routing";
import { motion } from "framer-motion";
import { motion, Variants, AnimatePresence } from "framer-motion";
import { use, useState, useCallback, useEffect } from "react";
import { AnimatePresence } from "framer-motion";
import { CldImage } from "next-cloudinary";
import { useTranslations, useLocale } from "next-intl";
@@ -48,14 +47,15 @@ export default function YachtPage({ params }: PageProps) {
if (!yacht) {
notFound();
return null;
}
const fadeInUp = {
const fadeInUp: Variants = {
hidden: { opacity: 0, y: 40 },
visible: { opacity: 1, y: 0, transition: { duration: 0.8, ease: "easeOut" } }
};
const staggerContainer = {
const staggerContainer: Variants = {
hidden: { opacity: 0 },
visible: { opacity: 1, transition: { staggerChildren: 0.15 } }
};