chore: fetch to get in redux thunks files name
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { AppDispatch, RootState } from "../redux/store";
|
||||
import { fetchSystemVoltTempThunk } from "../redux/thunks/fetchSystemVoltTempThunk";
|
||||
import { getSystemVoltTempThunk } from "../redux/thunks/getSystemVoltTempThunk";
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
CategoryScale,
|
||||
@@ -35,9 +35,9 @@ const SystemPage = () => {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(fetchSystemVoltTempThunk());
|
||||
dispatch(getSystemVoltTempThunk());
|
||||
const interval = setInterval(() => {
|
||||
dispatch(fetchSystemVoltTempThunk());
|
||||
dispatch(getSystemVoltTempThunk());
|
||||
}, 5000);
|
||||
return () => clearInterval(interval);
|
||||
}, [dispatch]);
|
||||
|
||||
Reference in New Issue
Block a user