Skip to content

feat(dashboard): add network switcher dropdown#9

Open
AlexeySamosadov wants to merge 1 commit intoAztecProtocol:mainfrom
AlexeySamosadov:feat/network-switcher
Open

feat(dashboard): add network switcher dropdown#9
AlexeySamosadov wants to merge 1 commit intoAztecProtocol:mainfrom
AlexeySamosadov:feat/network-switcher

Conversation

@AlexeySamosadov
Copy link

Summary

  • Add a dropdown component to switch between mainnet and testnet versions
  • Integrates with Navbar on both desktop and mobile views
  • Uses environment variables for network URL configuration

Motivation

Closes #4 - Users need an easy way to switch between mainnet and testnet versions of the staking dashboard, similar to how Dashtecs implements their network switcher.

Changes

  • New component: NetworkSwitcher - dropdown with current network indicator and switch options
  • Environment variables:
    • VITE_CURRENT_NETWORK (mainnet | testnet)
    • VITE_MAINNET_URL
    • VITE_TESTNET_URL
  • Navbar integration: Added switcher next to logo (desktop) and in mobile menu

Features

  • Shows "Mainnet ˅" or "Testnet ˅" based on current environment
  • Dropdown with checkmark on current network
  • Click-outside and Escape key to close
  • Accessible with proper ARIA attributes
  • Matches Aztec design system (chartreuse accent, oracle-standard font)

Test Plan

  • TypeScript compilation passes (tsc --noEmit)
  • ESLint passes
  • Manual testing on localhost
  • Verify redirect works between network URLs

Screenshots

Desktop view with dropdown in navbar, mobile view in hamburger menu


🤖 Generated with Claude Code

Add a dropdown component to switch between mainnet and testnet versions
of the staking dashboard, similar to the Dashtecs implementation.

Changes:
- New NetworkSwitcher component with dropdown menu
- Environment variables for network configuration
- Integration in Navbar (desktop and mobile)

Closes AztecProtocol#4
@AlexeySamosadov AlexeySamosadov requested a review from a team February 8, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Network switcher

1 participant