From 1f9b44abf4b9c56b04ed6adf002814f30fe13e8f Mon Sep 17 00:00:00 2001 From: leonthuongto Date: Fri, 31 May 2024 21:35:20 +0700 Subject: [PATCH] Handle set buy tab by default in SideBar.tsx --- src/components/LBP/PublicDetails/SideBar.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/LBP/PublicDetails/SideBar.tsx b/src/components/LBP/PublicDetails/SideBar.tsx index 888f6aac0e..dce868d49d 100644 --- a/src/components/LBP/PublicDetails/SideBar.tsx +++ b/src/components/LBP/PublicDetails/SideBar.tsx @@ -59,10 +59,7 @@ const TradeTabs: React.FC = ({ currentTab, onTabSelect }) => { } const SideBar: React.FC = ({ lbpData, isPausedSideBar }) => { - const [activeTab, setActiveTab] = React.useState(() => { - const savedTab = localStorage.getItem('ActiveTab') - return (savedTab as PublicDetails) ?? PublicDetails.buy - }) + const [activeTab, setActiveTab] = React.useState(PublicDetails.buy) const [open, setOpen] = React.useState(false) const handleOpen = () => setOpen(true) const handleClose = () => setOpen(false)