fix: avoid duplicate backlog hydration load
This commit is contained in:
parent
b489e26665
commit
38d99834ef
5 changed files with 47 additions and 8 deletions
|
|
@ -8,9 +8,11 @@ import { debugProps } from '@/lib/debug'
|
|||
// De voorganger (stores/product-store.ts) wordt in Story 8 (T-876) verwijderd.
|
||||
export function SetCurrentProduct({ id, name }: { id: string; name: string }) {
|
||||
useEffect(() => {
|
||||
useProductWorkspaceStore.getState().setActiveProduct({ id, name })
|
||||
useProductWorkspaceStore
|
||||
.getState()
|
||||
.setActiveProduct({ id, name }, { load: false, preserveSelection: true })
|
||||
return () => {
|
||||
useProductWorkspaceStore.getState().setActiveProduct(null)
|
||||
useProductWorkspaceStore.getState().setActiveProduct(null, { load: false })
|
||||
}
|
||||
}, [id, name])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue