diff --git a/client/src/Hooks/useDebounce.ts b/client/src/Hooks/useDebounce.ts index 175d079fa..57a7d4079 100644 --- a/client/src/Hooks/useDebounce.ts +++ b/client/src/Hooks/useDebounce.ts @@ -1,15 +1,5 @@ import { useState, useEffect } from "react"; -/** - * Custom hook for debouncing values - * @template T - The type of the value being debounced - * @param value - The value to debounce - * @param delay - The debounce delay in milliseconds - * @returns The debounced value - * - * @example - * const debouncedSearch = useDebounce(search, 300); // Debounces the search input with a 300ms delay - */ const useDebounce = (value: T, delay: number): T => { const [debouncedValue, setDebouncedValue] = useState(value); diff --git a/client/src/Pages/Infrastructure/Monitors/index.tsx b/client/src/Pages/Infrastructure/Monitors/index.tsx index 303c7d0f7..1d38dbdd3 100644 --- a/client/src/Pages/Infrastructure/Monitors/index.tsx +++ b/client/src/Pages/Infrastructure/Monitors/index.tsx @@ -44,8 +44,7 @@ const InfrastructureMonitors = () => { const [selectedMonitor, setSelectedMonitor] = useState(null); const isDialogOpen = Boolean(selectedMonitor); - // Debounce search input - 300ms delay - const debouncedSearch = useDebounce(search, 300); + const debouncedSearch = useDebounce(search, 300); const handleClearFilters = useCallback(() => { setSelectedStatus(""); diff --git a/client/src/Pages/Uptime/Monitors/index.tsx b/client/src/Pages/Uptime/Monitors/index.tsx index ec4935221..702bbd928 100644 --- a/client/src/Pages/Uptime/Monitors/index.tsx +++ b/client/src/Pages/Uptime/Monitors/index.tsx @@ -44,8 +44,7 @@ const UptimeMonitorsPage = () => { const [selectedMonitor, setSelectedMonitor] = useState(null); const isDialogOpen = Boolean(selectedMonitor); - // Debounce search input - 300ms delay - const debouncedSearch = useDebounce(search, 300); + const debouncedSearch = useDebounce(search, 300); // Convert filter selections to API filter values // Status: "up" -> true, "down" -> false