diff --git a/app/client/src/components/BottomBar/index.tsx b/app/client/src/components/BottomBar/index.tsx index 2b9c64c060..2e90f0abfa 100644 --- a/app/client/src/components/BottomBar/index.tsx +++ b/app/client/src/components/BottomBar/index.tsx @@ -23,12 +23,14 @@ export default function BottomBar({ viewMode }: { viewMode: boolean }) { return ( - + {!viewMode && ( + + )} {!viewMode && } {!viewMode && ( diff --git a/app/client/src/pages/AppViewer/index.tsx b/app/client/src/pages/AppViewer/index.tsx index 0a45e95c3f..47407e8443 100644 --- a/app/client/src/pages/AppViewer/index.tsx +++ b/app/client/src/pages/AppViewer/index.tsx @@ -44,19 +44,12 @@ import { } from "@appsmith/selectors/applicationSelectors"; import { editorInitializer } from "../../utils/editor/EditorUtils"; import { widgetInitialisationSuccess } from "../../actions/widgetActions"; -import { - areEnvironmentsFetched, - getEnvironmentsWithPermission, -} from "@appsmith/selectors/environmentSelectors"; import type { FontFamily } from "@design-system/theming"; import { ThemeProvider as WDSThemeProvider, useTheme, } from "@design-system/theming"; import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; -import { RAMP_NAME } from "utils/ProductRamps/RampsControlList"; -import { showProductRamps } from "@appsmith/selectors/rampSelectors"; -import { FEATURE_FLAG } from "@appsmith/entities/FeatureFlag"; import { KBViewerFloatingButton } from "@appsmith/pages/AppViewer/KnowledgeBase/KBViewerFloatingButton"; import urlBuilder from "@appsmith/entities/URLRedirect/URLAssembly"; import { getHideWatermark } from "@appsmith/selectors/tenantSelectors"; @@ -65,17 +58,12 @@ const AppViewerBody = styled.section<{ hasPages: boolean; headerHeight: number; showGuidedTourMessage: boolean; - showBottomBar: boolean; }>` display: flex; flex-direction: row; align-items: stretch; justify-content: flex-start; - height: calc( - 100vh - - ${(props) => (props.showBottomBar ? props.theme.bottomBarHeight : "0px")} - - ${({ headerHeight }) => headerHeight}px - ); + height: calc(100vh - ${({ headerHeight }) => headerHeight}px); --view-mode-header-height: ${({ headerHeight }) => headerHeight}px; `; @@ -132,26 +120,6 @@ function AppViewer(props: Props) { const { theme } = useTheme(isWDSEnabled ? wdsThemeProps : themeProps); const focusRef = useWidgetFocus(); - const showRampSelector = showProductRamps(RAMP_NAME.MULTIPLE_ENV, true); - const canShowRamp = useSelector(showRampSelector); - - const workspaceId = currentApplicationDetails?.workspaceId || ""; - const isMultipleEnvEnabled = useFeatureFlag( - FEATURE_FLAG.release_datasource_environments_enabled, - ); - const environmentList = useSelector(getEnvironmentsWithPermission); - // If there is only one environment and it is default, don't show the bottom bar - const isOnlyDefaultShown = - environmentList.length === 1 && environmentList[0]?.isDefault; - const showBottomBar = useSelector((state: AppState) => { - return ( - areEnvironmentsFetched(state, workspaceId) && - (isMultipleEnvEnabled || canShowRamp) && - environmentList.length > 0 && - !isOnlyDefaultShown - ); - }); - /** * initializes the widgets factory and registers all widgets */ @@ -251,17 +219,11 @@ function AppViewer(props: Props) { hasPages={pages.length > 1} headerHeight={headerHeight} ref={focusRef} - showBottomBar={!!showBottomBar} showGuidedTourMessage={showGuidedTourMessage} > {isInitialized && } - {showBottomBar && } -