diff options
author | Viktor Vorona <viktor.vorona@sonarsource.com> | 2024-12-09 14:11:59 +0100 |
---|---|---|
committer | Steve Marion <steve.marion@sonarsource.com> | 2024-12-18 11:13:20 +0100 |
commit | f4be4615fd322f4c29cda845934fe8e43fea0c64 (patch) | |
tree | 02e6edfe1c4df2e81f1ac8bc6b76f8ac00d7493b | |
parent | b0a822491040b6f2f0b3ad4e778b72a1ed4c9c27 (diff) | |
download | sonarqube-f4be4615fd322f4c29cda845934fe8e43fea0c64.tar.gz sonarqube-f4be4615fd322f4c29cda845934fe8e43fea0c64.zip |
SONAR-23906 Fix footer request for non upgrade instane
-rw-r--r-- | server/sonar-web/src/main/js/app/components/GlobalFooter.tsx | 4 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/queries/mode.ts | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx index e1c14d66f7f..25e56545b4a 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx @@ -45,7 +45,9 @@ interface GlobalFooterProps { export default function GlobalFooter({ hideLoggedInInfo }: Readonly<GlobalFooterProps>) { const appState = useAppState(); - const { data: isStandardMode } = useStandardExperienceModeQuery(); + const { data: isStandardMode } = useStandardExperienceModeQuery({ + enabled: appState.version !== '', + }); const currentEdition = appState?.edition && getEdition(appState.edition); const intl = useIntl(); const version = getInstanceVersionNumber(appState.version); diff --git a/server/sonar-web/src/main/js/queries/mode.ts b/server/sonar-web/src/main/js/queries/mode.ts index 51dcdfedfe8..37aa45804eb 100644 --- a/server/sonar-web/src/main/js/queries/mode.ts +++ b/server/sonar-web/src/main/js/queries/mode.ts @@ -33,8 +33,8 @@ const useModeQuery = createQueryHook(() => { }); }); -export const useStandardExperienceModeQuery = () => { - return useModeQuery({ select: (data) => data.mode === Mode.Standard }); +export const useStandardExperienceModeQuery = ({ enabled }: { enabled?: boolean } = {}) => { + return useModeQuery({ select: (data) => data.mode === Mode.Standard, enabled }); }; export const useModeModifiedQuery = () => { |