Final build fix: Explicitly type motion variants and strengthen null checks
This commit is contained in:
@@ -3,9 +3,8 @@
|
|||||||
import { yachts } from "../../../data/yachts";
|
import { yachts } from "../../../data/yachts";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { Link } from "@/i18n/routing";
|
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 { use, useState, useCallback, useEffect } from "react";
|
||||||
import { AnimatePresence } from "framer-motion";
|
|
||||||
import { CldImage } from "next-cloudinary";
|
import { CldImage } from "next-cloudinary";
|
||||||
import { useTranslations, useLocale } from "next-intl";
|
import { useTranslations, useLocale } from "next-intl";
|
||||||
|
|
||||||
@@ -48,14 +47,15 @@ export default function YachtPage({ params }: PageProps) {
|
|||||||
|
|
||||||
if (!yacht) {
|
if (!yacht) {
|
||||||
notFound();
|
notFound();
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const fadeInUp = {
|
const fadeInUp: Variants = {
|
||||||
hidden: { opacity: 0, y: 40 },
|
hidden: { opacity: 0, y: 40 },
|
||||||
visible: { opacity: 1, y: 0, transition: { duration: 0.8, ease: "easeOut" } }
|
visible: { opacity: 1, y: 0, transition: { duration: 0.8, ease: "easeOut" } }
|
||||||
};
|
};
|
||||||
|
|
||||||
const staggerContainer = {
|
const staggerContainer: Variants = {
|
||||||
hidden: { opacity: 0 },
|
hidden: { opacity: 0 },
|
||||||
visible: { opacity: 1, transition: { staggerChildren: 0.15 } }
|
visible: { opacity: 1, transition: { staggerChildren: 0.15 } }
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user