update pagespeed

This commit is contained in:
Alex Holliday committed 2026-01-12 23:57:39 +00:00
1 parent 7a6b0d5da4
commit 25d1039376
204 files changed
+977 -343

No files matched your search

@@ -1,6 +1,6 @@
import { useState, useEffect } from "react";
import { networkService } from "../../main.jsx";
import { createToast } from "../../Utils/toastUtils.jsx";
import { networkService } from "../main.jsx";
import { createToast } from "../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next";
const useFetchChecksTeam = ({
@@ -1,5 +1,5 @@
import { useState } from "react";
import { networkService } from "../../main.jsx";
import { networkService } from "../main.jsx";
import { useTranslation } from "react-i18next";
const CLIENT_HOST = import.meta.env.VITE_APP_CLIENT_HOST;
@@ -1,6 +1,6 @@
import { useState, useEffect } from "react";
import { networkService } from "../../main.jsx";
import { createToast } from "../../Utils/toastUtils.jsx";
import { networkService } from "../main.jsx";
import { createToast } from "../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next";
const useFetchLogs = () => {
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
import { networkService } from "../../main.jsx";
import { createToast } from "../../Utils/toastUtils.jsx";
import { networkService } from "../main.jsx";
import { createToast } from "../Utils/toastUtils.jsx";
import { useTheme } from "@emotion/react";
import { useMonitorUtils } from "./useMonitorUtils.js";
import { useNavigate } from "react-router-dom";
@@ -67,12 +67,13 @@ const useFetchMonitorsWithChecks = ({
field,
order,
});
const { count, monitors } = res?.data?.data ?? {};
const mappedMonitors = monitors.map((monitor) =>
getMonitorWithPercentage(monitor, theme)
);
setMonitors(mappedMonitors);
setCount(count?.monitorsCount ?? 0);
setCount(count || 0);
} catch (error) {
console.error(error);
setNetworkError(true);
@@ -347,7 +348,8 @@ const useDeleteMonitor = () => {
const deleteMonitor = async ({ monitor, redirect }) => {
try {
setIsLoading(true);
await networkService.deleteMonitorById({ monitorId: monitor._id });
console.log(monitor);
await networkService.deleteMonitorById({ monitorId: monitor.id });
createToast({ body: "Monitor deleted successfully!" });
if (redirect) {
navigate(redirect);
@@ -1,6 +1,6 @@
import { useState, useEffect } from "react";
import { networkService } from "../../main.jsx";
import { createToast } from "../../Utils/toastUtils.jsx";
import { networkService } from "../main.jsx";
import { createToast } from "../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next";
const useFetchSettings = ({ setSettingsData, setIsApiKeySet, setIsEmailPasswordSet }) => {
@@ -42,11 +42,11 @@ const useSaveSettings = ({
setIsLoading(true);
try {
const settingsResponse = await networkService.updateAppSettings({ settings });
if (settings.checkTTL) {
await networkService.updateChecksTTL({
ttl: settings.checkTTL,
});
}
// if (settings.checkTTL) {
// await networkService.updateChecksTTL({
// ttl: settings.checkTTL,
// });
// }
setIsApiKeySet(settingsResponse.data.data.pagespeedKeySet);
setIsEmailPasswordSet(settingsResponse.data.data.emailPasswordSet);
if (settingsResponse.data.data.pagespeedKeySet === true) {
File renamed without changes.
File renamed without changes.
@@ -1,9 +1,9 @@
import { useState, useEffect, useCallback } from "react";
import { createToast } from "../../Utils/toastUtils.jsx";
import { networkService } from "../../main.jsx";
import { createToast } from "../Utils/toastUtils.jsx";
import { networkService } from "../main.jsx";
import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { NOTIFICATION_TYPES } from "../../Pages/v1/Notifications/utils.js";
import { NOTIFICATION_TYPES } from "../Pages/Notifications/utils.js";
const useCreateNotification = () => {
const navigate = useNavigate();
@@ -1,7 +1,7 @@
import { useState } from "react";
import { networkService } from "../../main.jsx";
import { networkService } from "../main.jsx";
import { useSelector } from "react-redux";
import { createToast } from "../../Utils/toastUtils.jsx";
import { createToast } from "../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next";
const useSendTestEmail = () => {
@@ -1,6 +1,6 @@
import { useEffect, useState, useCallback } from "react";
import { networkService } from "../../main.jsx";
import { createToast } from "../../Utils/toastUtils.jsx";
import { networkService } from "../main.jsx";
import { createToast } from "../Utils/toastUtils.jsx";
import { useTranslation } from "react-i18next";
export const useGetUser = (userId) => {