Skip to content

Commit 1872388

Browse files
authored
fix: do not show latest version if auto-updating (#7388)
1 parent 87316d6 commit 1872388

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/sanity/src/core/studio/components/navbar/resources/ResourcesMenuItems.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {Box, MenuDivider, Text} from '@sanity/ui'
22

33
import {MenuItem} from '../../../../../ui-components'
44
import {LoadingBlock} from '../../../../components/loadingBlock'
5+
import {hasSanityPackageInImportMap} from '../../../../environment/hasSanityPackageInImportMap'
56
import {useTranslation} from '../../../../i18n'
67
import {SANITY_VERSION} from '../../../../version'
78
import {type ResourcesResponse, type Section} from './helper-functions/types'
@@ -15,6 +16,7 @@ interface ResourcesMenuItemProps {
1516
export function ResourcesMenuItems({error, isLoading, value}: ResourcesMenuItemProps) {
1617
const sections = value?.resources?.sectionArray
1718
const latestStudioVersion = value?.latestVersion
19+
const isAutoUpdating = hasSanityPackageInImportMap()
1820
const {t} = useTranslation()
1921

2022
if (isLoading) {
@@ -61,7 +63,7 @@ export function ResourcesMenuItems({error, isLoading, value}: ResourcesMenuItemP
6163
<Text size={1} muted weight="medium" textOverflow="ellipsis">
6264
{t('help-resources.studio-version', {studioVersion: SANITY_VERSION})}
6365
</Text>
64-
{!error && latestStudioVersion && (
66+
{!error && latestStudioVersion && !isAutoUpdating && (
6567
<Box paddingTop={2}>
6668
<Text size={1} muted textOverflow="ellipsis">
6769
{t('help-resources.latest-sanity-version', {

0 commit comments

Comments
 (0)