From 1872388e2b5e5bc916f4339fa546fa69e2b08499 Mon Sep 17 00:00:00 2001 From: Carolina Gonzalez Date: Tue, 20 Aug 2024 07:24:49 -0400 Subject: [PATCH] fix: do not show latest version if auto-updating (#7388) --- .../studio/components/navbar/resources/ResourcesMenuItems.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/sanity/src/core/studio/components/navbar/resources/ResourcesMenuItems.tsx b/packages/sanity/src/core/studio/components/navbar/resources/ResourcesMenuItems.tsx index 8a782918c49..854058d7d0f 100644 --- a/packages/sanity/src/core/studio/components/navbar/resources/ResourcesMenuItems.tsx +++ b/packages/sanity/src/core/studio/components/navbar/resources/ResourcesMenuItems.tsx @@ -2,6 +2,7 @@ import {Box, MenuDivider, Text} from '@sanity/ui' import {MenuItem} from '../../../../../ui-components' import {LoadingBlock} from '../../../../components/loadingBlock' +import {hasSanityPackageInImportMap} from '../../../../environment/hasSanityPackageInImportMap' import {useTranslation} from '../../../../i18n' import {SANITY_VERSION} from '../../../../version' import {type ResourcesResponse, type Section} from './helper-functions/types' @@ -15,6 +16,7 @@ interface ResourcesMenuItemProps { export function ResourcesMenuItems({error, isLoading, value}: ResourcesMenuItemProps) { const sections = value?.resources?.sectionArray const latestStudioVersion = value?.latestVersion + const isAutoUpdating = hasSanityPackageInImportMap() const {t} = useTranslation() if (isLoading) { @@ -61,7 +63,7 @@ export function ResourcesMenuItems({error, isLoading, value}: ResourcesMenuItemP {t('help-resources.studio-version', {studioVersion: SANITY_VERSION})} - {!error && latestStudioVersion && ( + {!error && latestStudioVersion && !isAutoUpdating && ( {t('help-resources.latest-sanity-version', {