From dcb37689a938466e4a8a8a9f2cd0edffb263e905 Mon Sep 17 00:00:00 2001 From: maciek Date: Mon, 21 Aug 2023 15:42:42 +0200 Subject: [PATCH] fix: fix hidden sidebars on load --- apps/trading/components/sidebar/sidebar.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/apps/trading/components/sidebar/sidebar.tsx b/apps/trading/components/sidebar/sidebar.tsx index 2dcf8d4a8..a817d5c2e 100644 --- a/apps/trading/components/sidebar/sidebar.tsx +++ b/apps/trading/components/sidebar/sidebar.tsx @@ -14,12 +14,9 @@ import { Settings } from '../settings'; import { Tooltip } from '../../components/tooltip'; import { WithdrawContainer } from '../withdraw-container'; import { Routes as AppRoutes } from '../../pages/client-router'; -import { persist } from 'zustand/middleware'; import { GetStarted } from '../welcome-dialog'; import { useVegaWallet, useViewAsDialog } from '@vegaprotocol/wallet'; -const STORAGE_KEY = 'vega_sidebar_store'; - export enum ViewType { Order = 'Order', Info = 'Info', @@ -303,7 +300,6 @@ export const useSidebar = create<{ view: SidebarView | null; setView: (view: SidebarView | null) => void; }>()( - persist( (set) => ({ init: true, view: null, @@ -312,12 +308,7 @@ export const useSidebar = create<{ if (x == null) { return { view: null, init: false }; } - return { view: x, init: false }; }), - }), - { - name: STORAGE_KEY, - } - ) + }) );