1
0
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:
Nuno Góis 2025-11-20 17:38:08 +00:00 committed by GitHub
parent 87e901256b
commit 3bca150cd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,