mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-21 00:59:44 -06:00
fix: running formatting script on both client and server directories
This commit is contained in:
@@ -17,7 +17,13 @@ import { useNavigate } from "react-router-dom";
|
||||
import PropTypes from "prop-types";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
const MonitorsTable = ({ shouldRender, monitors, isAdmin, handleActionMenuDelete, isSearching }) => {
|
||||
const MonitorsTable = ({
|
||||
shouldRender,
|
||||
monitors,
|
||||
isAdmin,
|
||||
handleActionMenuDelete,
|
||||
isSearching,
|
||||
}) => {
|
||||
// Utils
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
const useDebounce = (value, delay) => {
|
||||
const [debouncedValue, setDebouncedValue] = useState(value);
|
||||
const [debouncedValue, setDebouncedValue] = useState(value);
|
||||
|
||||
useEffect(() => {
|
||||
const handler = setTimeout(() => {
|
||||
setDebouncedValue(value);
|
||||
}, delay);
|
||||
useEffect(() => {
|
||||
const handler = setTimeout(() => {
|
||||
setDebouncedValue(value);
|
||||
}, delay);
|
||||
|
||||
return () => {
|
||||
clearTimeout(handler);
|
||||
};
|
||||
}, [value, delay]);
|
||||
return debouncedValue;
|
||||
return () => {
|
||||
clearTimeout(handler);
|
||||
};
|
||||
}, [value, delay]);
|
||||
return debouncedValue;
|
||||
};
|
||||
|
||||
export default useDebounce;
|
||||
|
||||
@@ -24,7 +24,7 @@ const useMonitorFetch = ({ page, field, filter, rowsPerPage, updateTrigger, sear
|
||||
types: ["hardware"],
|
||||
page: page,
|
||||
rowsPerPage: rowsPerPage,
|
||||
search: search
|
||||
search: search,
|
||||
});
|
||||
setMonitors(response?.data?.data?.filteredMonitors ?? []);
|
||||
setSummary(response?.data?.data?.summary ?? {});
|
||||
|
||||
@@ -59,7 +59,7 @@ const InfrastructureMonitors = () => {
|
||||
filter: toFilterStatus,
|
||||
rowsPerPage,
|
||||
updateTrigger,
|
||||
search
|
||||
search,
|
||||
});
|
||||
|
||||
if (networkError === true) {
|
||||
|
||||
@@ -187,7 +187,8 @@ class NetworkService {
|
||||
*/
|
||||
|
||||
async getMonitorsByTeamId(config) {
|
||||
const { teamId, limit, types, page, rowsPerPage, filter, field, order, search } = config;
|
||||
const { teamId, limit, types, page, rowsPerPage, filter, field, order, search } =
|
||||
config;
|
||||
const params = new URLSearchParams();
|
||||
|
||||
if (limit) params.append("limit", limit);
|
||||
|
||||
@@ -147,7 +147,7 @@ const getMonitorsByTeamIdQueryValidation = joi.object({
|
||||
filter: joi.string(),
|
||||
field: joi.string(),
|
||||
order: joi.string().valid("asc", "desc"),
|
||||
search: joi.string()
|
||||
search: joi.string(),
|
||||
});
|
||||
|
||||
const getMonitorStatsByIdParamValidation = joi.object({
|
||||
|
||||
Reference in New Issue
Block a user