File tree Expand file tree Collapse file tree
src/shared/layout/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Col , Menu , Row } from 'antd'
22import { generatePath , Link , useParams } from 'react-router-dom'
3- import { Notifications , WalletMenu } from '@/shared/web3'
3+ import { Notifications , useAddress , WalletMenu } from '@/shared/web3'
44import logo from '@/assets/images/logo.png'
5- import { useConnection } from 'wagmi'
5+ import { useAccount } from 'wagmi'
66import { useActiveAccount } from 'thirdweb/react'
77
88export default function Topnav ( ) {
99 const params = useParams ( )
1010 const { isConnected, address } = useConnection ( )
1111 const activeAccount = useActiveAccount ( )
12+ const token = useAddress ( 'Market#PexfiToken' )
13+ const chainId = useChainId ( )
1214
1315 const navItems = [
1416 {
@@ -25,6 +27,19 @@ export default function Topnav() {
2527 } ,
2628 ]
2729
30+ if ( token && chainId ) {
31+ let net : string ;
32+ switch ( chainId ) {
33+ case 1 : net = 'ethereum' ; break ;
34+ case 11155111 : net = 'ethereum_sepolia' ; break ;
35+ }
36+
37+ navItems . push ( {
38+ key : 'own' ,
39+ label : < a target = { '_blank' } href = { 'https://app.uniswap.org/explore/tokens/' + net + '/' + token } > Own</ a >
40+ } )
41+ }
42+
2843 const userMenuItems = [
2944 {
3045 label : (
You can’t perform that action at this time.
0 commit comments