remove authToken reading and passing in UI component and hooks

This commit is contained in:
dongfang committed 2025-02-18 04:56:26 +00:00
1 parent 6a1e5532e4
commit f2ae99768a
41 files changed
+76 -135

No files matched your search

@@ -5,7 +5,6 @@ import { useTheme } from "@emotion/react";
import { useMonitorUtils } from "../../../../Hooks/useMonitorUtils";
export const useMonitorFetch = ({
authToken,
teamId,
limit,
page,
@@ -28,7 +27,6 @@ export const useMonitorFetch = ({
try {
setMonitorsAreLoading(true);
const res = await networkService.getMonitorsByTeamId({
authToken,
teamId,
limit,
types: ["http", "ping", "docker", "port"],
@@ -56,7 +54,6 @@ export const useMonitorFetch = ({
};
fetchMonitors();
}, [
authToken,
teamId,
limit,
field,
+1 -2
View File
@@ -54,7 +54,7 @@ CreateMonitorButton.propTypes = {
const UptimeMonitors = () => {
// Redux state
const { authToken, user } = useSelector((state) => state.auth);
const { user } = useSelector((state) => state.auth);
const rowsPerPage = useSelector((state) => state.ui.monitors.rowsPerPage);
// Local state
@@ -96,7 +96,6 @@ const UptimeMonitors = () => {
monitorsSummary,
networkError,
} = useMonitorsFetch({
authToken,
teamId,
limit: 25,
page: page,