Skip to content

Commit 3993b2c

Browse files
committed
fix(themer): dispatch the split-screen actions the reducer handles
The split toggle derived both the view transition type and the reducer action from one string, so it dispatched `split-creen:open`/`:close`, which `toolReducer` does not handle, and the split never changed.
1 parent 17c90c4 commit 3993b2c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎plugins/@sanity/themer/src/tool/ThemerSidebar.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ export function ThemerSidebar({split}: Pick<ToolReducerState, 'split'>) {
7777
mode="bleed"
7878
onClick={() =>
7979
startTransition(() => {
80-
const type = split ? 'split-creen:close' : 'split-creen:open'
81-
addThemerTransitionType(type)
82-
dispatch({type})
80+
addThemerTransitionType(split ? 'split-creen:close' : 'split-creen:open')
81+
dispatch({type: split ? 'split-screen:close' : 'split-screen:open'})
8382
})
8483
}
8584
onMouseEnter={() =>

0 commit comments

Comments
 (0)