Skip to content

Commit

Permalink
fix: publish all doesn't need to navigate to overview anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanl17 committed Dec 24, 2024
1 parent e2f4ade commit b54af08
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {ErrorOutlineIcon, PublishIcon} from '@sanity/icons'
import {useTelemetry} from '@sanity/telemetry/react'
import {Flex, Text, useToast} from '@sanity/ui'
import {useCallback, useMemo, useState} from 'react'
import {useRouter} from 'sanity/router'

import {Button, Dialog} from '../../../../../ui-components'
import {ToneIcon} from '../../../../../ui-components/toneIcon/ToneIcon'
Expand All @@ -27,7 +26,6 @@ export const ReleasePublishAllButton = ({
disabled,
}: ReleasePublishAllButtonProps) => {
const toast = useToast()
const router = useRouter()
const {publishRelease} = useReleaseOperations()
const {t} = useTranslation(releasesLocaleNamespace)
const perspective = usePerspective()
Expand Down Expand Up @@ -69,8 +67,6 @@ export const ReleasePublishAllButton = ({
</Text>
),
})
// TODO: handle a published release on the document list
router.navigate({})
if (
isReleaseDocument(perspective.selectedPerspective) &&
perspective.selectedPerspective?._id === release._id
Expand All @@ -94,7 +90,7 @@ export const ReleasePublishAllButton = ({
} finally {
setPublishBundleStatus('idle')
}
}, [release, publishBundleStatus, publishRelease, telemetry, toast, t, router, perspective])
}, [release, publishBundleStatus, publishRelease, telemetry, toast, t, perspective])

const confirmPublishDialog = useMemo(() => {
if (publishBundleStatus === 'idle') return null
Expand Down

0 comments on commit b54af08

Please sign in to comment.