File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ import { useTaskEvents } from '@/hooks/use-task-events'
107107import { SIDEBAR_WIDTH } from '@/stores/constants'
108108import { useFolderStore } from '@/stores/folders/store'
109109import { useSearchModalStore } from '@/stores/modals/search/store'
110+ import { useMothershipDraftsStore } from '@/stores/mothership-drafts/store'
110111import { useSidebarStore } from '@/stores/sidebar/store'
111112
112113const logger = createLogger ( 'Sidebar' )
@@ -1163,6 +1164,7 @@ export const Sidebar = memo(function Sidebar() {
11631164 if ( ! workspaceId ) return
11641165 try {
11651166 const { id } = await createTaskMutation . mutateAsync ( )
1167+ useMothershipDraftsStore . getState ( ) . clearDraft ( `${ workspaceId } :new` )
11661168 navigateToPage ( `/workspace/${ workspaceId } /task/${ id } ` )
11671169 } catch {
11681170 navigateToPage ( `/workspace/${ workspaceId } /home` )
You can’t perform that action at this time.
0 commit comments