From 475a4859837bae1aa79a1c0b674437d070527b1a Mon Sep 17 00:00:00 2001 From: Carolina Gonzalez Date: Mon, 19 Aug 2024 16:48:08 -0400 Subject: [PATCH] fix: do not show latest version if auto-updating --- .../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', {