diff --git a/daostar-website/src/components/RegistrationCard/DisplayRegistration/DisplayRegistration.js b/daostar-website/src/components/RegistrationCard/DisplayRegistration/DisplayRegistration.js index edc32608..45342958 100644 --- a/daostar-website/src/components/RegistrationCard/DisplayRegistration/DisplayRegistration.js +++ b/daostar-website/src/components/RegistrationCard/DisplayRegistration/DisplayRegistration.js @@ -57,7 +57,7 @@ const DisplayRegistration = ({ case "Stargaze": return ; default: - return ; + return ; } }; diff --git a/daostar-website/src/components/RegistrationCard/DisplayRegistration/EtherscanLink/EtherscanLink.js b/daostar-website/src/components/RegistrationCard/DisplayRegistration/EtherscanLink/EtherscanLink.js index db345bf0..149e2d70 100644 --- a/daostar-website/src/components/RegistrationCard/DisplayRegistration/EtherscanLink/EtherscanLink.js +++ b/daostar-website/src/components/RegistrationCard/DisplayRegistration/EtherscanLink/EtherscanLink.js @@ -4,10 +4,23 @@ import { Tooltip2 } from '@blueprintjs/popover2'; import './EtherscanLink.css'; const EtherscanLink = ({ - address + address, + network = 'ethereum' // default network is ethereum }) => { - const url = `https://etherscan.io/address/${address}`; + const getUrl = (network, address) => { + switch (network) { + case 'optimism': + return `https://optimistic.etherscan.io/address/${address}`; + case 'arbitrum': + return `https://arbiscan.io/address/${address}`; + case 'ethereum': + default: + return `https://etherscan.io/address/${address}`; + } + }; + + const url = getUrl(network, address); return (
@@ -15,10 +28,11 @@ const EtherscanLink = ({ href={url} className='no-underline' target="_blank" + rel="noopener noreferrer" > {address}
- ) -} + ); +}; -export default EtherscanLink; \ No newline at end of file +export default EtherscanLink;