Skip to content

Commit ba3fd3b

Browse files
committed
do not persist layout
1 parent f80130b commit ba3fd3b

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

src/main/client/src/layout.js

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,16 @@ export const useViewStateStore = create((set, get) => ({
3131
},
3232
}))
3333

34-
export const useLayoutStore = create(
35-
persist(
36-
(set, get) => ({
37-
sidebarWidth: {
38-
"game": 24 * getRemInPixel(),
39-
"lobby": 24 * getRemInPixel(),
40-
},
41-
setSidebarWidth: (page, width) => {
42-
set(produce(state => {
43-
let newSidebarWidth = {...get().sidebarWidth}
44-
newSidebarWidth[page] = Math.trunc(width)
45-
state.sidebarWidth = newSidebarWidth
46-
}))
47-
},
48-
}),
49-
{name: "layout-storage"},
50-
),
51-
)
34+
export const useLayoutStore = create((set, get) => ({
35+
sidebarWidth: {
36+
"game": 24 * getRemInPixel(),
37+
"lobby": 24 * getRemInPixel(),
38+
},
39+
setSidebarWidth: (page, width) => {
40+
set(produce(state => {
41+
let newSidebarWidth = {...get().sidebarWidth}
42+
newSidebarWidth[page] = Math.trunc(width)
43+
state.sidebarWidth = newSidebarWidth
44+
}))
45+
},
46+
}))

0 commit comments

Comments
 (0)