diff --git a/apps/console/src/features/applications/api/use-scopes-of-api-resources.ts b/apps/console/src/features/applications/api/use-scopes-of-api-resources.ts index 8b724bc88a1..31b7edbea16 100644 --- a/apps/console/src/features/applications/api/use-scopes-of-api-resources.ts +++ b/apps/console/src/features/applications/api/use-scopes-of-api-resources.ts @@ -33,8 +33,7 @@ import { AuthorizedPermissionListItemInterface } from "../models/api-authorizati * @throws `IdentityAppsApiException` */ const useScopesOfAPIResources = ( - apiResourceId: string, - shouldFetch?: boolean + apiResourceId: string ): RequestResultInterface => { const requestConfig: AxiosRequestConfig = { @@ -46,7 +45,7 @@ const useScopesOfAPIResources = (shouldFetch ? requestConfig: null); + const { data, error, isValidating, mutate } = useRequest(apiResourceId ? requestConfig: null); return { data, diff --git a/apps/console/src/features/applications/components/api-authorization/scope-form.tsx b/apps/console/src/features/applications/components/api-authorization/scope-form.tsx index 17b18258a96..7949eb338ce 100644 --- a/apps/console/src/features/applications/components/api-authorization/scope-form.tsx +++ b/apps/console/src/features/applications/components/api-authorization/scope-form.tsx @@ -99,7 +99,7 @@ export const ScopeForm: FunctionComponent = ( data: currentAPIResourceScopeListData, isLoading: isCurrentAPIResourceScopeListDataLoading, error: currentAPIResourceScopeListFetchError - } = useScopesOfAPIResources(subscribedAPIResource?.id, subscribedAPIResource?.id != null); + } = useScopesOfAPIResources(subscribedAPIResource?.id); /** * The following useEffect is used to handle if any error occurs while fetching API resource scopes. diff --git a/apps/console/src/features/applications/components/api-authorization/wizard/authorize-api-resource.tsx b/apps/console/src/features/applications/components/api-authorization/wizard/authorize-api-resource.tsx index 1b36cb148c4..a5e6e8a25e7 100644 --- a/apps/console/src/features/applications/components/api-authorization/wizard/authorize-api-resource.tsx +++ b/apps/console/src/features/applications/components/api-authorization/wizard/authorize-api-resource.tsx @@ -116,7 +116,7 @@ export const AuthorizeAPIResource: FunctionComponent