diff --git a/frontend/src/scenes/pipeline/destinations/newDestinationsLogic.tsx b/frontend/src/scenes/pipeline/destinations/newDestinationsLogic.tsx index a0aecfca38babf..5b702e77186541 100644 --- a/frontend/src/scenes/pipeline/destinations/newDestinationsLogic.tsx +++ b/frontend/src/scenes/pipeline/destinations/newDestinationsLogic.tsx @@ -4,7 +4,9 @@ import { actions, afterMount, connect, kea, listeners, path, reducers, selectors import { loaders } from 'kea-loaders' import { actionToUrl, combineUrl, router, urlToAction } from 'kea-router' import api from 'lib/api' +import { FEATURE_FLAGS } from 'lib/constants' import { LemonField } from 'lib/lemon-ui/LemonField' +import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { objectsEqual } from 'lib/utils' import posthog from 'posthog-js' import { urls } from 'scenes/urls' @@ -42,7 +44,7 @@ export interface Fuse extends FuseClass {} export const newDestinationsLogic = kea([ connect({ - values: [userLogic, ['user']], + values: [userLogic, ['user'], featureFlagLogic, ['featureFlags']], }), path(() => ['scenes', 'pipeline', 'destinations', 'newDestinationsLogic']), actions({ @@ -104,10 +106,26 @@ export const newDestinationsLogic = kea([ }, ], destinations: [ - (s) => [s.plugins, s.hogFunctionTemplates, s.batchExportServiceNames, router.selectors.hashParams], - (plugins, hogFunctionTemplates, batchExportServiceNames, hashParams): NewDestinationItemType[] => { + (s) => [ + s.plugins, + s.hogFunctionTemplates, + s.batchExportServiceNames, + s.featureFlags, + router.selectors.hashParams, + ], + ( + plugins, + hogFunctionTemplates, + batchExportServiceNames, + featureFlags, + hashParams + ): NewDestinationItemType[] => { + const hogTemplates = featureFlags[FEATURE_FLAGS.HOG_FUNCTIONS] + ? Object.values(hogFunctionTemplates) + : [] + return [ - ...Object.values(hogFunctionTemplates).map((hogFunction) => ({ + ...hogTemplates.map((hogFunction) => ({ icon: , name: hogFunction.name, description: hogFunction.description, diff --git a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx index 5b66a92a708b13..089c0c648d4d4d 100644 --- a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx +++ b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx @@ -304,6 +304,7 @@ export const hogFunctionConfigurationLogic = kea [s.configuration, s.currentTeam, s.groupTypes], (configuration, currentTeam, groupTypes): HogFunctionInvocationGlobals => { + const currentUrl = window.location.href.split('#')[0] const globals: HogFunctionInvocationGlobals = { event: { uuid: uuid(), @@ -312,7 +313,7 @@ export const hogFunctionConfigurationLogic = kea