mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-05-19 07:56:34 +00:00
feat(tabs-store): persist only problemTab and workspaceTab in local storage
This commit is contained in:
parent
2b6b7c54d5
commit
8bf109679d
@ -22,9 +22,11 @@ export const useTabsStore = create<TabsState>()(
|
|||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
name: "tabs-active",
|
name: "tabs-active",
|
||||||
onRehydrateStorage:
|
partialize: (state) => ({
|
||||||
() =>
|
problemTab: state.problemTab,
|
||||||
(state, error) => {
|
workspaceTab: state.workspaceTab,
|
||||||
|
}),
|
||||||
|
onRehydrateStorage: () => (state, error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error("hydrate error", error);
|
console.error("hydrate error", error);
|
||||||
} else if (state) {
|
} else if (state) {
|
||||||
|
Loading…
Reference in New Issue
Block a user