Iniital commit

This commit is contained in:
Alex Holliday committed 2024-06-21 11:08:31 -07:00
1 parent 30b2229e98
commit 2f1053bd05
5 files changed
+41 -49

No files matched your search

+13 -2
View File
@@ -1,12 +1,23 @@
// import CreateNewMonitor from "./CreateNewMonitor";
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 (
<div className="monitors">
<CurrentStats />
<CurrentStats monitors={monitorState.monitors} />
{/* <CreateNewMonitor /> */}
</div>
);