Skip to content

Commit

Permalink
perf(navbar): Persist opened state between sessions (#1815)
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsluph authored Aug 1, 2024
1 parent 3fd85a1 commit 17f9759
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/stores/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export const useNavbarStore = defineStore(

return {
isDrawerOpen,
_timeData,
_downloadData,
_uploadData,
downloadData,
uploadData,
pushTimeData,
Expand All @@ -49,8 +52,11 @@ export const useNavbarStore = defineStore(
},
{
persistence: {
enabled: false,
storageItems: [{ storage: sessionStorage }]
enabled: true,
storageItems: [
{ storage: sessionStorage, excludePaths: ['isDrawerOpen'] },
{ storage: localStorage, includePaths: ['isDrawerOpen'] }
],
}
}
)
Expand Down

0 comments on commit 17f9759

Please sign in to comment.