Commit 23cfca8 1 parent ea740d1 commit 23cfca8 Copy full SHA for 23cfca8
File tree 1 file changed +3
-0
lines changed
frontend/src/features/settings/hooks
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
13
13
removeLOADocument ,
14
14
updateLOA ,
15
15
} from "../apiManager/loa" ;
16
+ import { useFeatureFlagsQuery } from "../../../common/hooks/hooks" ;
16
17
17
18
const QUERY_KEYS = {
18
19
LOAS : ( expired : boolean ) => [ "loas" , expired ] ,
@@ -26,11 +27,13 @@ const QUERY_KEYS = {
26
27
* @returns Query result of the company's LOAs
27
28
*/
28
29
export const useFetchLOAs = ( companyId : number | string , expired : boolean ) => {
30
+ const { data : featureFlags } = useFeatureFlagsQuery ( ) ;
29
31
return useQuery ( {
30
32
queryKey : QUERY_KEYS . LOAS ( expired ) ,
31
33
queryFn : ( ) => getLOAs ( companyId , expired ) ,
32
34
retry : false ,
33
35
refetchOnMount : "always" ,
36
+ enabled : featureFlags ?. [ 'LOA' ] === 'ENABLED' ,
34
37
refetchOnWindowFocus : false ,
35
38
} ) ;
36
39
} ;
You can’t perform that action at this time.
0 commit comments