Create new monitor without dropdowns
This commit is contained in:
1 parent
ca689d4de8
commit
4eab458065
1 file changed
+14
-2
@@ -1,13 +1,25 @@
|
|||||||
import CreateNewMonitor from "./CreateNewMonitor";
|
import CreateNewMonitor from "./CreateNewMonitor";
|
||||||
// import CurrentStats from "./CurrentStats";
|
import CurrentStats from "./CurrentStats";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import React from "react";
|
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 Monitors = () => {
|
||||||
|
const monitorState = useSelector((state) => state.monitors);
|
||||||
|
const authstate = useSelector((state) => state.auth);
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
dispatch(getMonitorsByUserId(authstate.authToken));
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="monitors">
|
<div className="monitors">
|
||||||
{/* <CurrentStats /> */}
|
|
||||||
<CreateNewMonitor />
|
<CreateNewMonitor />
|
||||||
|
{/* <CurrentStats monitors={monitorState.monitors} /> */}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user