Conversation
ESLint Summary View Full Report
Report generated by eslint-plus-action |
|
Travis automatic deployment: |
| ); | ||
|
|
||
| return ( | ||
| <StyledButton className={className} onClick={goToEtherscan}> |
There was a problem hiding this comment.
why are we using a button for a link?
There was a problem hiding this comment.
This was implemented the right way in safe-react... https://github.com/gnosis/safe-react/blob/development/src/components/EtherscanBtn/index.tsx
please pay more attention to semantics of html elements you're using
|
also, these are components library, we shouldn't put any logic there |
forming a URL could not be considered "putting logic". |
|
changes applied |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
| value, | ||
| network = 'mainnet', | ||
| }: Props): React.ReactElement => { | ||
| const getEtherscanLink = () => |
There was a problem hiding this comment.
Why this couldn't be just
const etherscanLink = `https://${getNetwork(network)}etherscan.io/${type}/${value}`
I've seen multiple places where you define value as const getValue = () => value and then use the function in render method and always wanted to ask this
There was a problem hiding this comment.
right, it was used for the button, now that we are using a link, it's no needed.
|
Travis automatic deployment: |
No description provided.