Skip to content

Commit

Permalink
fix switching to logged in network
Browse files Browse the repository at this point in the history
  • Loading branch information
aeddaqqa committed Dec 27, 2023
1 parent 425d1ae commit 4e74ff9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/components/Navbar/NetworkSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ export default function NetworkSwitcher({ handleCloseSidebar }: NetworkSwitcherP
flexDirection: 'column',
alignItems: 'baseline',
color: theme.palette.text.primary,
...(network.name === activeNetwork.name && { cursor: 'auto' }),
}}
onClick={() => {
if (network.name === activeNetwork.name) return
changeNetwork(network.name)
}}
onClick={() => changeNetwork(network.name)}
>
<Stack
direction="row"
Expand Down Expand Up @@ -192,9 +196,14 @@ export default function NetworkSwitcher({ handleCloseSidebar }: NetworkSwitcherP
value={network.name}
divider
onClick={() => {
if (network.name === activeNetwork.name) return
handleChangeNetwork(network.name)
}}
sx={{ gap: '.6rem', justifyContent: 'space-between' }}
sx={{
gap: '.6rem',
justifyContent: 'space-between',
...(network.name === activeNetwork.name && { cursor: 'auto' }),
}}
data-cy={`network-name-${network.name}`}
>
<Typography variant="body2" component="span" noWrap>
Expand Down

0 comments on commit 4e74ff9

Please sign in to comment.