diff --git a/src/components/Common/KilnInfo/Kiln.jsx b/src/components/Common/KilnInfo/Kiln.jsx index 3b195c6..d72b08d 100644 --- a/src/components/Common/KilnInfo/Kiln.jsx +++ b/src/components/Common/KilnInfo/Kiln.jsx @@ -4,6 +4,7 @@ import { useSelector } from "react-redux"; import { stateNameMap } from "../../../store/features/kilnSlice"; import { useEffect } from "react"; import { useDispatch } from "react-redux"; + export default function Kiln() { const kilnInfo = useSelector((state) => state.kiln); const dispatch = useDispatch(); @@ -15,21 +16,21 @@ export default function Kiln() { })); useEffect(() => { - setTimeout(() => { + setInterval(() => { dispatch({ type: "kiln/setKilnInfo", payload: { - kilnPressure: "100Pa", - waterTemp: "100℃", - waterFlow: "100m³/h", - waterPressure: "100Pa", - combustionAirPressure: "100Pa", - topTemp: "100℃", - compressedAirPressure: "100Pa", - meltTemp: "100℃", + kilnPressure: Math.ceil(Math.random() * 100) + "Pa", + waterTemp: Math.ceil(Math.random() * 100) + "℃", + waterFlow: Math.ceil(Math.random() * 100) + "m³/h", + waterPressure: Math.ceil(Math.random() * 100) + "Pa", + combustionAirPressure: Math.ceil(Math.random() * 100) + "Pa", + topTemp: Math.ceil(Math.random() * 100) + "℃", + compressedAirPressure: Math.ceil(Math.random() * 100) + "Pa", + meltTemp: Math.ceil(Math.random() * 100) + "℃", }, }); - }, 3000); + }, 30000); }, []); // const infos = [