From 5918c3c4b393d0a2297a94a4d2bab344e5f677c1 Mon Sep 17 00:00:00 2001 From: Ellen Kraffmiller Date: Mon, 1 Jul 2024 10:20:59 -0400 Subject: [PATCH] fix:usePollDatasetLocks.ts remove DraftAlert when navigating to published Dataset --- src/sections/dataset/usePollDatasetLocks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sections/dataset/usePollDatasetLocks.ts b/src/sections/dataset/usePollDatasetLocks.ts index 55f5c53b4..45ae44f09 100644 --- a/src/sections/dataset/usePollDatasetLocks.ts +++ b/src/sections/dataset/usePollDatasetLocks.ts @@ -17,6 +17,7 @@ const usePollDatasetLocks = ( const navigateToPublishedDataset = (persistentId: string) => { removeDatasetAlert(AlertMessageKey.PUBLISH_IN_PROGRESS) + removeDatasetAlert(AlertMessageKey.DRAFT_VERSION) navigate(`${Route.DATASETS}?persistentId=${persistentId}`, { state: { publishInProgress: false } }) @@ -26,7 +27,6 @@ const usePollDatasetLocks = ( if (publishInProgress && dataset) { addDatasetAlert({ messageKey: AlertMessageKey.PUBLISH_IN_PROGRESS, variant: 'info' }) - removeDatasetAlert(AlertMessageKey.DRAFT_VERSION) const gotoReleasedPageAfterPublish = async () => { const initialLocks = await getDatasetLocks(datasetRepository, dataset.persistentId) console.log('initial locks:', JSON.stringify(initialLocks))