chore: fetch to get in redux thunks files name
This commit is contained in:
@@ -6,8 +6,8 @@ import { AppDispatch, RootState } from "../redux/store";
|
||||
|
||||
import InputModal from "../components/main/einausgaenge/modals/InputModal";
|
||||
|
||||
import { fetchDigitalInputsThunk } from "@/redux/thunks/fetchDigitalInputsThunk";
|
||||
import { fetchDigitalOutputsThunk } from "../redux/thunks/fetchDigitalOutputsThunk";
|
||||
import { getDigitalInputsThunk } from "@/redux/thunks/getDigitalInputsThunk";
|
||||
import { getDigitalOutputsThunk } from "../redux/thunks/getDigitalOutputsThunk";
|
||||
|
||||
import DigitalInputs from "../components/main/einausgaenge/DigitalInputs";
|
||||
|
||||
@@ -26,12 +26,12 @@ const EinAusgaenge: React.FC = () => {
|
||||
const [isOutputModalOpen, setIsOutputModalOpen] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(fetchDigitalInputsThunk());
|
||||
dispatch(fetchDigitalOutputsThunk());
|
||||
dispatch(getDigitalInputsThunk());
|
||||
dispatch(getDigitalOutputsThunk());
|
||||
|
||||
const interval = setInterval(() => {
|
||||
dispatch(fetchDigitalInputsThunk());
|
||||
dispatch(fetchDigitalOutputsThunk());
|
||||
dispatch(getDigitalInputsThunk());
|
||||
dispatch(getDigitalOutputsThunk());
|
||||
}, 10000);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
|
||||
Reference in New Issue
Block a user