tangle-network / dapp

Monorepo for the Tangle ecosystem.
https://app.tangle.tools
Apache License 2.0
29 stars 15 forks source link

[TASK] Add network selection component and implement network-based page access in Tangle dApp #2089

Closed devpavan04 closed 6 months ago

devpavan04 commented 7 months ago

Overview

Currently, the tangle-dapp connects to the Tangle Testnet by default. However, we should enable users to connect to various networks, including:

To implement this, consider using the network selection component from the stats-dapp as a reference. This component allows users to input custom endpoints and connect to either the Tangle Mainnet or Testnet.

CleanShot 2024-03-12 at 11 44 29

CleanShot 2024-03-12 at 11 44 34

Additionally, we should implement network-based access restrictions for certain pages on the tangle-dapp, depending on the user's selected network. For example, the Restaking feature should be available on the Testnet but not on the Mainnet for now. This restriction can be enforced by displaying a Not Supported modal.

monaiuu commented 7 months ago

Checklist

drewstone commented 6 months ago

The UI here in the issue should be updated CC @monaiuu

monaiuu commented 6 months ago

Updated Handoff

Update network switching feature, allowing users to seamlessly toggle between mainnet, testnet, and a custom RPC endpoint.

Reference: For an example of a similar implementation, see the network switch component at app.webb.tools.

Figma Link

Custom Endpoint Flow

Image

monaiuu commented 6 months ago

@yurixander I also updated the above comment to completely hide Service Overview and Restake pages from the side navigation so it is not accessible for public at launch. Only if connected to development would these pages be accessible.

yurixander commented 6 months ago

Gate Service Overview & Restake: Remove Service Overview Page & Restake Page from side navigation. Only if user is in development would this be accessible.

Will be handling this part on a separate issue.