fix(app): transition draft project updates (#34252)
This commit is contained in:
parent
41202819a4
commit
ae53163cad
1 changed files with 6 additions and 4 deletions
|
|
@ -173,10 +173,12 @@ export const { use: useTabs, provider: TabsProvider } = createSimpleContext({
|
|||
})
|
||||
},
|
||||
updateDraft(draftID: string, draft: Partial<Omit<DraftTab, "type" | "draftID">>) {
|
||||
setStore(
|
||||
(tab) => tab.type === "draft" && tab.draftID === draftID,
|
||||
produce((tab) => Object.assign(tab, draft)),
|
||||
)
|
||||
void startTransition(() => {
|
||||
setStore(
|
||||
(tab) => tab.type === "draft" && tab.draftID === draftID,
|
||||
produce((tab) => Object.assign(tab, draft)),
|
||||
)
|
||||
})
|
||||
},
|
||||
promoteDraft(draftID: string, session: Omit<SessionTab, "type">) {
|
||||
// Keep the replacement and navigation atomic so /new-session never renders
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue