From 4eab458065ef11d8c36b5169e00c4722e8ce5fe7 Mon Sep 17 00:00:00 2001 From: MuhammadKhalilzadeh Date: Tue, 25 Jun 2024 13:30:52 +0330 Subject: [PATCH] Create new monitor without dropdowns --- Client/src/Pages/Monitors/index.jsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Client/src/Pages/Monitors/index.jsx b/Client/src/Pages/Monitors/index.jsx index fbc0413d0..ff8937af3 100644 --- a/Client/src/Pages/Monitors/index.jsx +++ b/Client/src/Pages/Monitors/index.jsx @@ -1,13 +1,25 @@ import CreateNewMonitor from "./CreateNewMonitor"; -// import CurrentStats from "./CurrentStats"; +import CurrentStats from "./CurrentStats"; import "./index.css"; import React from "react"; +import { useEffect } from "react"; +import { useSelector } from "react-redux"; +import { useDispatch } from "react-redux"; +import { getMonitorsByUserId } from "../../Features/Monitors/monitorsSlice"; const Monitors = () => { + const monitorState = useSelector((state) => state.monitors); + const authstate = useSelector((state) => state.auth); + const dispatch = useDispatch(); + + useEffect(() => { + dispatch(getMonitorsByUserId(authstate.authToken)); + }, []); + return (
- {/* */} + {/* */}
); };