Files
Checkmate/Client/src/Pages/Monitors/index.jsx
T

25 lines
708 B
React
Raw Normal View History

2024-06-25 13:30:52 +03:30
import CurrentStats from "./CurrentStats";
2024-06-05 21:09:14 +03:30
import "./index.css";
2024-06-25 13:30:52 +03:30
import { useEffect } from "react";
import { useSelector } from "react-redux";
import { useDispatch } from "react-redux";
import { getMonitorsByUserId } from "../../Features/Monitors/monitorsSlice";
const Monitors = () => {
2024-06-25 13:30:52 +03:30
const monitorState = useSelector((state) => state.monitors);
const authstate = useSelector((state) => state.auth);
const dispatch = useDispatch();
useEffect(() => {
dispatch(getMonitorsByUserId(authstate.authToken));
}, []);
2024-06-05 21:09:14 +03:30
return (
<div className="monitors">
2024-06-26 21:56:56 +03:30
{/* <CurrentStats monitors={monitorState.monitors} /> */}
<CreateNewMonitor />
2024-06-05 21:09:14 +03:30
</div>
);
};
2024-06-05 21:09:14 +03:30
export default Monitors;