From efec8904e32b5add3ffa8a9a676582d46aae86b6 Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Wed, 6 Nov 2024 12:59:57 -0800 Subject: [PATCH] filter stack options --- .../app-settings/GeneralSettings/LinuxStacks/LinuxStacks.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client-react/src/pages/app/app-settings/GeneralSettings/LinuxStacks/LinuxStacks.tsx b/client-react/src/pages/app/app-settings/GeneralSettings/LinuxStacks/LinuxStacks.tsx index 9a3595cba0..11dfb03d78 100644 --- a/client-react/src/pages/app/app-settings/GeneralSettings/LinuxStacks/LinuxStacks.tsx +++ b/client-react/src/pages/app/app-settings/GeneralSettings/LinuxStacks/LinuxStacks.tsx @@ -41,7 +41,6 @@ const LinuxStacks: React.FC = props => { const { webAppStacks, stackVersionDetails } = useStacks(initialValues.config.properties.linuxFxVersion); const siteStateContext = useContext(SiteStateContext); - const runtimeOptions = getRuntimeStacks(webAppStacks); const { t } = useTranslation(); const scenarioService = new ScenarioService(t); @@ -54,6 +53,7 @@ const LinuxStacks: React.FC = props => { () => filterDeprecatedWebAppStack(webAppStacks, stackVersionDetails.runtimeStackName, stackVersionDetails.minorVersionRuntime), [webAppStacks, stackVersionDetails.runtimeStackName, stackVersionDetails.minorVersionRuntime] ); + const runtimeOptions = useMemo(() => getRuntimeStacks(filterredWebAppStacks), [filterredWebAppStacks]); const isRuntimeStackDirty = (): boolean => getRuntimeStack(values.config.properties.linuxFxVersion) !== getRuntimeStack(initialValues.config.properties.linuxFxVersion); @@ -152,6 +152,8 @@ const LinuxStacks: React.FC = props => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [values.config.properties.linuxFxVersion]); + console.log(runtimeStack); + return ( <> {(scenarioService.checkScenario(ScenarioIds.linuxAppRuntime, { site }).status !== 'disabled' || siteStateContext.isWordPressApp) && (