import BlueRect from "../BlueRect"; import { useSelector } from "react-redux"; import { motion, AnimatePresence } from "framer-motion"; import { useEffect, useState } from "react"; const blueTe = ["TE401", "TE402", "TE403", "PE401", "PE402", "PE403"]; function TemperatureBottom(props) { const tempBottom = useSelector((state) => state.temperature.bottom); const speed = props.speed; const floor = props.floor; const [speedAn, setSpeedAn] = useState({}); useEffect(() => { // 2,3互切不用展示动画 if (speed === "f") { setSpeedAn({}); } else { if (floor === 2) { setSpeedAn({ opacity: [0, 0, 0, 0.6, 1], transition: { duration: 0.3, delay: 1.8 }, }); } else { setSpeedAn({}); } } }, [floor]); return ( {Object.keys(tempBottom).map((d) => ( ))} ); } export default TemperatureBottom;