From fb1291c76dc20d97d27b685f541372cc2f867e73 Mon Sep 17 00:00:00 2001 From: Dominik Zborowski Date: Sat, 26 Oct 2024 08:07:21 +0200 Subject: [PATCH] fix: handle multiple user sessions for grid (#511) --- app.vue | 4 +- components/ProfileView.vue | 55 ++++++++++++++++++++-------- domains/grid/components/GridView.vue | 24 +++--------- domains/grid/composables/useGrid.ts | 20 +++++++++- stores/grid.ts | 30 ++++++++++++++- 5 files changed, 95 insertions(+), 38 deletions(-) diff --git a/app.vue b/app.vue index d19d60dc..ef3f5a6d 100644 --- a/app.vue +++ b/app.vue @@ -23,7 +23,7 @@ const { cacheValue } = useCache() const { currencyList } = storeToRefs(useCurrencyStore()) const { initProvider, reconnect } = useWalletConnectProvider() const { formatMessage } = useIntl() -const { gridChainId, tempGrid } = storeToRefs(useGridStore()) +const { gridChainId, tempGrids } = storeToRefs(useGridStore()) const setupTranslations = () => { useIntl().setupIntl(defaultConfig) @@ -117,7 +117,7 @@ const setupNetwork = async () => { // reset temp grid layout if network is changed if (gridChainId.value !== selectedChainId.value) { - tempGrid.value = [] + tempGrids.value = {} } gridChainId.value = selectedChainId.value diff --git a/components/ProfileView.vue b/components/ProfileView.vue index 25b8c56b..21441e1f 100644 --- a/components/ProfileView.vue +++ b/components/ProfileView.vue @@ -1,5 +1,7 @@