Skip to content

Commit 39413b8

Browse files
committed
refactor: tcr explorer link to typescript
1 parent 7d8e5d1 commit 39413b8

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react'
22
import styled from 'styled-components/macro'
3-
import PropTypes from 'prop-types'
43
import { getAddressPage } from 'utils/network-utils'
54

65
const StyledIcon = styled.svg`
@@ -26,11 +25,15 @@ const StyledLink = styled.a`
2625
align-items: center;
2726
`
2827

29-
const ConrtractExplorerUrl = ({ networkId, contractAddress }) => {
28+
const ContractExplorerUrl: React.FC<{
29+
networkId: number
30+
contractAddress: string
31+
}> = ({ networkId, contractAddress }) => {
3032
const url = `${getAddressPage({
3133
networkId,
3234
address: contractAddress
3335
})}#code`
36+
console.log({ url })
3437
return (
3538
<StyledLink
3639
href={url}
@@ -67,9 +70,4 @@ const ConrtractExplorerUrl = ({ networkId, contractAddress }) => {
6770
</StyledLink>
6871
)
6972
}
70-
export default ConrtractExplorerUrl
71-
72-
ConrtractExplorerUrl.propTypes = {
73-
networkId: PropTypes.string.isRequired,
74-
contractAddress: PropTypes.string.isRequired
75-
}
73+
export default ContractExplorerUrl

0 commit comments

Comments
 (0)