diff --git a/src/hooks/useDatabaseAccounts.tsx b/src/hooks/useDatabaseAccounts.tsx index 6de81a100..9a28afaad 100644 --- a/src/hooks/useDatabaseAccounts.tsx +++ b/src/hooks/useDatabaseAccounts.tsx @@ -1,6 +1,5 @@ import { HttpHeaders } from "Common/Constants"; import { QueryRequestOptions, QueryResponse } from "Contracts/AzureResourceGraph"; -import { userContext } from "UserContext"; import useSWR from "swr"; import { configContext } from "../ConfigContext"; import { DatabaseAccount } from "../Contracts/DataModels"; @@ -83,10 +82,7 @@ export async function fetchDatabaseAccountsFromGraph( export function useDatabaseAccounts(subscriptionId: string, armToken: string): DatabaseAccount[] | undefined { const { data } = useSWR( () => (armToken && subscriptionId ? ["databaseAccounts", subscriptionId, armToken] : undefined), - (_, subscriptionId, armToken) => - userContext.features.enableResourceGraph - ? fetchDatabaseAccountsFromGraph(subscriptionId, armToken) - : fetchDatabaseAccounts(subscriptionId, armToken), + (_, subscriptionId, armToken) => fetchDatabaseAccountsFromGraph(subscriptionId, armToken), ); return data; } diff --git a/src/hooks/useSubscriptions.tsx b/src/hooks/useSubscriptions.tsx index 11f1626dd..5fa7073be 100644 --- a/src/hooks/useSubscriptions.tsx +++ b/src/hooks/useSubscriptions.tsx @@ -1,6 +1,5 @@ import { HttpHeaders } from "Common/Constants"; import { QueryRequestOptions, QueryResponse } from "Contracts/AzureResourceGraph"; -import { userContext } from "UserContext"; import useSWR from "swr"; import { configContext } from "../ConfigContext"; import { Subscription } from "../Contracts/DataModels"; @@ -87,8 +86,7 @@ export async function fetchSubscriptionsFromGraph(accessToken: string): Promise< export function useSubscriptions(armToken: string): Subscription[] | undefined { const { data } = useSWR( () => (armToken ? ["subscriptions", armToken] : undefined), - (_, armToken) => - userContext.features.enableResourceGraph ? fetchSubscriptionsFromGraph(armToken) : fetchSubscriptions(armToken), + (_, armToken) => fetchSubscriptionsFromGraph(armToken), ); return data; }