From f87699518d39a0eca17e000ca8d8ba8104c15b37 Mon Sep 17 00:00:00 2001 From: Alex Birdsall Date: Wed, 18 Jan 2023 17:02:26 -0800 Subject: [PATCH] Make ReleaseStageBadge show free tag based on prop --- .../ReleaseStageBadge/ReleaseStageBadge.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/airbyte-webapp/src/components/ReleaseStageBadge/ReleaseStageBadge.tsx b/airbyte-webapp/src/components/ReleaseStageBadge/ReleaseStageBadge.tsx index 6ec8069d546e..857cd5244d5c 100644 --- a/airbyte-webapp/src/components/ReleaseStageBadge/ReleaseStageBadge.tsx +++ b/airbyte-webapp/src/components/ReleaseStageBadge/ReleaseStageBadge.tsx @@ -5,7 +5,6 @@ import { GAIcon } from "components/icons/GAIcon"; import { Tooltip } from "components/ui/Tooltip"; import { ReleaseStage } from "core/request/AirbyteClient"; -import { useFreeConnectorProgram } from "packages/cloud/components/experiments/FreeConnectorProgram/hooks/useFreeConnectorProgram"; import styles from "./ReleaseStageBadge.module.scss"; @@ -16,15 +15,17 @@ interface ReleaseStageBadgeProps { * Whether to show a detailed message via a tooltip. If not specified, will be {@code true}. */ tooltip?: boolean; + showFreeTag?: boolean; } -export const ReleaseStageBadge: React.FC = ({ stage, small, tooltip = true }) => { - const { data: freeConnectorProgramInfo } = useFreeConnectorProgram(); - const showFreeConnectorUi = Boolean(freeConnectorProgramInfo?.isEnrolled); +export const ReleaseStageBadge: React.FC = ({ + stage, + small, + tooltip = true, + showFreeTag = false, +}) => { const { formatMessage } = useIntl(); - const showFreeTag = showFreeConnectorUi && (stage === "alpha" || stage === "beta"); - if (!stage || stage === ReleaseStage.custom) { return null; }