-
Notifications
You must be signed in to change notification settings - Fork 30
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we using a button for a link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please check eslint warnings
Travis automatic deployment: |
value, | ||
network = 'mainnet', | ||
}: Props): React.ReactElement => { | ||
const getEtherscanLink = () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, it was used for the button, now that we are using a link, it's no needed.
Travis automatic deployment: |
No description provided.