mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-24 20:06:55 +01:00
chore: show connected edges for pro customers (#11009)
https://linear.app/unleash/issue/2-4040/show-connected-edges-for-pro-customers Show connected Edges for Pro customers. This was previously filtered to Enterprise only instances.
This commit is contained in:
parent
87e901256b
commit
3bca150cd8
@ -1,5 +1,4 @@
|
||||
import { useMemo } from 'react';
|
||||
import useUiConfig from '../useUiConfig/useUiConfig.js';
|
||||
import { formatApiPath } from 'utils/formatPath';
|
||||
import handleErrorResponses from '../httpErrorResponseHandler.js';
|
||||
import { useConditionalSWR } from '../useConditionalSWR/useConditionalSWR.js';
|
||||
@ -10,11 +9,10 @@ import { useUiFlag } from 'hooks/useUiFlag';
|
||||
const DEFAULT_DATA: ConnectedEdge[] = [];
|
||||
|
||||
export const useConnectedEdges = (options?: SWRConfiguration) => {
|
||||
const { isEnterprise } = useUiConfig();
|
||||
const edgeObservabilityEnabled = useUiFlag('edgeObservability');
|
||||
|
||||
const { data, error, mutate } = useConditionalSWR<ConnectedEdge[]>(
|
||||
isEnterprise() && edgeObservabilityEnabled,
|
||||
edgeObservabilityEnabled,
|
||||
DEFAULT_DATA,
|
||||
formatApiPath('api/admin/metrics/edges'),
|
||||
fetcher,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user