Network selector
Last updated
const NETWORKS = ['Mainnet', 'Testnet'];
const networkSettings = {
networks: NETWORKS,
currentNetwork: NETWORKS[0],
onNetworkSwitch: (n) => {
console.log('Network selected', n);
window.csprclickUI.setNetwork(n);
},
}const clickUIOptions = {
uiContainer: 'csprclick-ui',
rootAppElement: '#app',
showTopBar: true,
networkSettings,
};import mainnetIcon from './assets/ico-mainnet.svg'
import testnetIcon from './assets/ico-testnet.svg'
const NETWORKS = [
{ title: 'Mainnet', icon: mainnetIcon },
{ title: 'Testnet', icon: testnetIcon }
];