File tree Expand file tree Collapse file tree 4 files changed +28
-12
lines changed
template_content/src/components
test_all_default_parameters_off/src/components
test_all_default_parameters_on_netlify/src/components
test_all_default_parameters_on_vercel/src/components Expand file tree Collapse file tree 4 files changed +28
-12
lines changed Original file line number Diff line number Diff line change 11import { useWallet } from '@txnlab/use-wallet'
2+ import { useMemo } from 'react'
23import { ellipseAddress } from '../utils/ellipseAddress'
34import { getAlgodConfigFromViteEnvironment } from '../utils/network/getAlgoClientConfigs'
45
56const Account = ( ) => {
67 const { activeAddress } = useWallet ( )
78 const algoConfig = getAlgodConfigFromViteEnvironment ( )
9+
10+ const dappFlowNetworkName = useMemo ( ( ) => {
11+ return algoConfig . network === '' ? 'sandbox' : algoConfig . network . toLocaleLowerCase ( )
12+ } , [ algoConfig . network ] )
13+
814 return (
915 < div >
1016 < a
1117 className = "text-xl"
1218 target = "_blank"
13- href = { `https://${
14- [ 'mainnet' , '' ] . includes ( algoConfig . network . toLowerCase ( ) ) ? '' : `${ algoConfig . network . toLowerCase ( ) } .`
15- } algoexplorer.io/address/${ activeAddress } `}
19+ href = { `https://app.dappflow.org/setnetwork?name=${ dappFlowNetworkName } &redirect=explorer/account/${ activeAddress } /` }
1620 >
1721 Address: { ellipseAddress ( activeAddress ) }
1822 </ a >
Original file line number Diff line number Diff line change 11import { useWallet } from '@txnlab/use-wallet'
2+ import { useMemo } from 'react'
23import { ellipseAddress } from '../utils/ellipseAddress'
34import { getAlgodConfigFromViteEnvironment } from '../utils/network/getAlgoClientConfigs'
45
56const Account = ( ) => {
67 const { activeAddress } = useWallet ( )
78 const algoConfig = getAlgodConfigFromViteEnvironment ( )
9+
10+ const dappFlowNetworkName = useMemo ( ( ) => {
11+ return algoConfig . network === '' ? 'sandbox' : algoConfig . network . toLocaleLowerCase ( )
12+ } , [ algoConfig . network ] )
13+
814 return (
915 < div >
1016 < a
1117 className = "text-xl"
1218 target = "_blank"
13- href = { `https://${
14- [ 'mainnet' , '' ] . includes ( algoConfig . network . toLowerCase ( ) ) ? '' : `${ algoConfig . network . toLowerCase ( ) } .`
15- } algoexplorer.io/address/${ activeAddress } `}
19+ href = { `https://app.dappflow.org/setnetwork?name=${ dappFlowNetworkName } &redirect=explorer/account/${ activeAddress } /` }
1620 >
1721 Address: { ellipseAddress ( activeAddress ) }
1822 </ a >
Original file line number Diff line number Diff line change 11import { useWallet } from '@txnlab/use-wallet'
2+ import { useMemo } from 'react'
23import { ellipseAddress } from '../utils/ellipseAddress'
34import { getAlgodConfigFromViteEnvironment } from '../utils/network/getAlgoClientConfigs'
45
56const Account = ( ) => {
67 const { activeAddress } = useWallet ( )
78 const algoConfig = getAlgodConfigFromViteEnvironment ( )
9+
10+ const dappFlowNetworkName = useMemo ( ( ) => {
11+ return algoConfig . network === '' ? 'sandbox' : algoConfig . network . toLocaleLowerCase ( )
12+ } , [ algoConfig . network ] )
13+
814 return (
915 < div >
1016 < a
1117 className = "text-xl"
1218 target = "_blank"
13- href = { `https://${
14- [ 'mainnet' , '' ] . includes ( algoConfig . network . toLowerCase ( ) ) ? '' : `${ algoConfig . network . toLowerCase ( ) } .`
15- } algoexplorer.io/address/${ activeAddress } `}
19+ href = { `https://app.dappflow.org/setnetwork?name=${ dappFlowNetworkName } &redirect=explorer/account/${ activeAddress } /` }
1620 >
1721 Address: { ellipseAddress ( activeAddress ) }
1822 </ a >
Original file line number Diff line number Diff line change 11import { useWallet } from '@txnlab/use-wallet'
2+ import { useMemo } from 'react'
23import { ellipseAddress } from '../utils/ellipseAddress'
34import { getAlgodConfigFromViteEnvironment } from '../utils/network/getAlgoClientConfigs'
45
56const Account = ( ) => {
67 const { activeAddress } = useWallet ( )
78 const algoConfig = getAlgodConfigFromViteEnvironment ( )
9+
10+ const dappFlowNetworkName = useMemo ( ( ) => {
11+ return algoConfig . network === '' ? 'sandbox' : algoConfig . network . toLocaleLowerCase ( )
12+ } , [ algoConfig . network ] )
13+
814 return (
915 < div >
1016 < a
1117 className = "text-xl"
1218 target = "_blank"
13- href = { `https://${
14- [ 'mainnet' , '' ] . includes ( algoConfig . network . toLowerCase ( ) ) ? '' : `${ algoConfig . network . toLowerCase ( ) } .`
15- } algoexplorer.io/address/${ activeAddress } `}
19+ href = { `https://app.dappflow.org/setnetwork?name=${ dappFlowNetworkName } &redirect=explorer/account/${ activeAddress } /` }
1620 >
1721 Address: { ellipseAddress ( activeAddress ) }
1822 </ a >
You can’t perform that action at this time.
0 commit comments