Update hooks to use undefined for initial state
This commit is contained in:
1 parent
a9851787e8
commit
cfb5c7ae5d
3 files changed
+4
-4
No files matched your search
@@ -10,7 +10,7 @@ const useCertificateFetch = ({
|
||||
certificateDateFormat,
|
||||
uiTimezone,
|
||||
}) => {
|
||||
const [certificateExpiry, setCertificateExpiry] = useState("N/A");
|
||||
const [certificateExpiry, setCertificateExpiry] = useState(undefined);
|
||||
const [certificateIsLoading, setCertificateIsLoading] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -10,8 +10,8 @@ export const useChecksFetch = ({
|
||||
page,
|
||||
rowsPerPage,
|
||||
}) => {
|
||||
const [checks, setChecks] = useState([]);
|
||||
const [checksCount, setChecksCount] = useState(0);
|
||||
const [checks, setChecks] = useState(undefined);
|
||||
const [checksCount, setChecksCount] = useState(undefined);
|
||||
const [checksAreLoading, setChecksAreLoading] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useNavigate } from "react-router-dom";
|
||||
|
||||
export const useMonitorFetch = ({ authToken, monitorId, dateRange }) => {
|
||||
const [monitorIsLoading, setMonitorsIsLoading] = useState(false);
|
||||
const [monitor, setMonitor] = useState({});
|
||||
const [monitor, setMonitor] = useState(undefined);
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user