paradigmxyz / rivet

Developer Wallet & DevTools for Anvil
MIT License
844 stars 73 forks source link

Bug: Clicking on the network config gear multiple times creates multiple network-config screens #76

Closed androidsixteen closed 1 year ago

androidsixteen commented 1 year ago

Describe the bug Clicking on the gear icon in the header multiple times creates multiple network config screens.

Expected behavior would be for a second click to hide the already displayed network config screen. This is a minor bug.

To Reproduce

  1. Click on the gear icon in the network row of the header
  2. Click it again
  3. Click "X" icon to dismiss network config screen
  4. An additional network config screen remains after the first has been dismissed

Expected behavior Dismissing the network config screen once should toggle it off.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Potential solution - instead of navigating here (https://github.com/paradigmxyz/rivet/blob/main/src/components/Header.tsx#L273), could check first whether it is displayed and go back in history if gear is clicked again.

jxom commented 1 year ago

Fixed!