diff --git a/app/client/src/components/editorComponents/GlobalSearch/HelpBar.tsx b/app/client/src/components/editorComponents/GlobalSearch/HelpBar.tsx index e05c5bdb78d..c52eb62c9ef 100644 --- a/app/client/src/components/editorComponents/GlobalSearch/HelpBar.tsx +++ b/app/client/src/components/editorComponents/GlobalSearch/HelpBar.tsx @@ -1,18 +1,16 @@ import React from "react"; import styled from "styled-components"; -import { connect, useSelector } from "react-redux"; +import { connect } from "react-redux"; import { getTypographyByKey, Text, TextType } from "@appsmith/ads-old"; import { Icon } from "@appsmith/ads"; import { setGlobalSearchCategory } from "actions/globalSearchActions"; -import { HELPBAR_PLACEHOLDER } from "ee/constants/messages"; import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import { modText } from "utils/helpers"; import { filterCategories, SEARCH_CATEGORY_ID } from "./utils"; import { protectedModeSelector } from "selectors/gitSyncSelectors"; import type { AppState } from "ee/reducers"; -import { getIsSideBySideEnabled } from "selectors/ideSelectors"; -const StyledHelpBar = styled.button<{ isSideBySideFlagEnabled?: boolean }>` +const StyledHelpBar = styled.button` padding: 0 var(--ads-v2-spaces-3); margin: var(--ads-v2-spaces-2); .placeholder-text { @@ -30,6 +28,10 @@ const StyledHelpBar = styled.button<{ isSideBySideFlagEnabled?: boolean }>` font-family: var(--ads-v2-font-family); font-size: var(--ads-v2-font-size-4); color: var(--ads-v2-color-fg); + flex-grow: 0; + gap: 8px; + min-width: fit-content; + &:hover { border: 1px solid var(--ads-v2-color-border-emphasis-plus); } @@ -38,13 +40,6 @@ const StyledHelpBar = styled.button<{ isSideBySideFlagEnabled?: boolean }>` &[disabled] { cursor: not-allowed; } - ${({ isSideBySideFlagEnabled }) => - isSideBySideFlagEnabled && - ` - flex-grow: 0; - gap: 8px; - min-width: fit-content; - `} `; interface Props { @@ -53,20 +48,14 @@ interface Props { } function HelpBar({ isProtectedMode, toggleShowModal }: Props) { - const isSideBySideFlagEnabled = useSelector(getIsSideBySideEnabled); - return ( - {!isSideBySideFlagEnabled && ( - {HELPBAR_PLACEHOLDER()} - )} - {isSideBySideFlagEnabled && } + {modText()} K