Skip to content

Commit 724bc02

Browse files
committed
store collapsed
1 parent f1c0912 commit 724bc02

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

website/src/components/MapPage.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ export default {
154154
},
155155
data() {
156156
return {
157-
isCollapsed: false,
157+
isCollapsed: (() => {
158+
const savedState = localStorage.getItem('mapMenuCollapsed');
159+
return savedState !== null ? savedState === 'true' : false;
160+
})(),
158161
email: '',
159162
formSubmitted: false,
160163
loading: true,
@@ -330,6 +333,9 @@ export default {
330333
},
331334
selectedBedCategory: function (newValue, oldValue) {
332335
this.updateQueryParams('bedCategory', newValue);
336+
},
337+
isCollapsed: function(newValue) {
338+
localStorage.setItem('mapMenuCollapsed', newValue);
333339
}
334340
},
335341
async mounted() {

0 commit comments

Comments
 (0)