From cde4aa8b485923529f31c0beffcb97fe76658cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Tue, 2 Sep 2025 14:08:14 +0100 Subject: [PATCH] chore: clean up hook --- .../src/component/unknownFlags/hooks/useUnknownFlags.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/component/unknownFlags/hooks/useUnknownFlags.ts b/frontend/src/component/unknownFlags/hooks/useUnknownFlags.ts index 9c93ef4e28..561f77a7d7 100644 --- a/frontend/src/component/unknownFlags/hooks/useUnknownFlags.ts +++ b/frontend/src/component/unknownFlags/hooks/useUnknownFlags.ts @@ -1,8 +1,8 @@ import { useMemo } from 'react'; import { formatApiPath } from 'utils/formatPath'; -import { useConditionalSWR } from 'hooks/api/getters/useConditionalSWR/useConditionalSWR.js'; import handleErrorResponses from 'hooks/api/getters/httpErrorResponseHandler'; import type { SWRConfiguration } from 'swr'; +import useSWR from 'swr'; type UnknownFlagEnvReport = { environment: string; @@ -31,9 +31,7 @@ const DEFAULT_DATA: UnknownFlagsResponse = { }; export const useUnknownFlags = (options?: SWRConfiguration) => { - const { data, error, mutate } = useConditionalSWR( - true, - DEFAULT_DATA, + const { data, error, mutate } = useSWR( formatApiPath(ENDPOINT), fetcher, options,