Exporting Hooks from One File
This commit is contained in:
1 parent
c981b25ef9
commit
bcf883223b
4 files changed
+59
-64
No files matched your search
@@ -13,8 +13,8 @@ import { useSelector } from "react-redux";
|
||||
import { useState } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useFetchChecksTeam } from "../../../../Hooks/checkHooksTeam";
|
||||
import { useFetchChecksByMonitor } from "../../../../Hooks/checkHooksMonitor";
|
||||
import { useFetchChecksTeam } from "../../../../Hooks/checkHooks";
|
||||
import { useFetchChecksByMonitor } from "../../../../Hooks/checkHooks";
|
||||
|
||||
const IncidentTable = ({
|
||||
shouldRender,
|
||||
@@ -57,10 +57,10 @@ const IncidentTable = ({
|
||||
rowsPerPage: rowsPerPage,
|
||||
});
|
||||
|
||||
const checks = selectedMonitor === "0" ? checksTeam : checksMonitor;
|
||||
const checksCount = selectedMonitor === "0" ? checksCountTeam : checksCountMonitor;
|
||||
const isLoading = selectedMonitor === "0" ? isLoadingTeam : isLoadingMonitor;
|
||||
const networkError = selectedMonitor === "0" ? networkErrorTeam : networkErrorMonitor;
|
||||
const checks = checksTeam || checksMonitor;
|
||||
const checksCount = checksCountTeam || checksCountMonitor;
|
||||
const isLoading = isLoadingTeam || isLoadingMonitor;
|
||||
const networkError = networkErrorTeam || networkErrorMonitor;
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { useTheme } from "@emotion/react";
|
||||
import { useIsAdmin } from "../../../Hooks/useIsAdmin";
|
||||
import { useFetchUptimeMonitorById } from "../../../Hooks/monitorHooks";
|
||||
import useCertificateFetch from "./Hooks/useCertificateFetch";
|
||||
import { useFetchChecksByMonitor } from "../../../Hooks/checkHooksMonitor";
|
||||
import { useFetchChecksByMonitor } from "../../../Hooks/checkHooks";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
// Constants
|
||||
|
||||
Reference in new issue
Block a user