Skip to content

Commit

Permalink
Merge pull request #37 from algorandfoundation/use-lora
Browse files Browse the repository at this point in the history
chore: use lora for exploring
  • Loading branch information
neilcampbell authored Oct 22, 2024
2 parents 7d032a3 + ddc9a69 commit 3de40ca
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ const Account = () => {
const { activeAddress } = useWallet()
const algoConfig = getAlgodConfigFromViteEnvironment()

const dappFlowNetworkName = useMemo(() => {
return algoConfig.network === '' ? 'sandbox' : algoConfig.network.toLocaleLowerCase()
const networkName = useMemo(() => {
return algoConfig.network === '' ? 'localnet' : algoConfig.network.toLocaleLowerCase()
}, [algoConfig.network])

return (
<div>
<a
className="text-xl"
target="_blank"
href={`https://app.dappflow.org/setnetwork?name=${dappFlowNetworkName}&redirect=explorer/account/${activeAddress}/`}
>
<a className="text-xl" target="_blank" href={`https://lora.algokit.io/${networkName}/account/${activeAddress}/`}>
Address: {ellipseAddress(activeAddress)}
</a>
<div className="text-xl">Network: {algoConfig.network === '' ? 'localnet' : algoConfig.network}</div>
<div className="text-xl">Network: {networkName}</div>
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ const Account = () => {
const { activeAddress } = useWallet()
const algoConfig = getAlgodConfigFromViteEnvironment()

const dappFlowNetworkName = useMemo(() => {
return algoConfig.network === '' ? 'sandbox' : algoConfig.network.toLocaleLowerCase()
const networkName = useMemo(() => {
return algoConfig.network === '' ? 'localnet' : algoConfig.network.toLocaleLowerCase()
}, [algoConfig.network])

return (
<div>
<a
className="text-xl"
target="_blank"
href={`https://app.dappflow.org/setnetwork?name=${dappFlowNetworkName}&redirect=explorer/account/${activeAddress}/`}
>
<a className="text-xl" target="_blank" href={`https://lora.algokit.io/${networkName}/account/${activeAddress}/`}>
Address: {ellipseAddress(activeAddress)}
</a>
<div className="text-xl">Network: {algoConfig.network === '' ? 'localnet' : algoConfig.network}</div>
<div className="text-xl">Network: {networkName}</div>
</div>
)
}
Expand Down
12 changes: 4 additions & 8 deletions examples/production_react/src/components/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ const Account = () => {
const { activeAddress } = useWallet()
const algoConfig = getAlgodConfigFromViteEnvironment()

const dappFlowNetworkName = useMemo(() => {
return algoConfig.network === '' ? 'sandbox' : algoConfig.network.toLocaleLowerCase()
const networkName = useMemo(() => {
return algoConfig.network === '' ? 'localnet' : algoConfig.network.toLocaleLowerCase()
}, [algoConfig.network])

return (
<div>
<a
className="text-xl"
target="_blank"
href={`https://app.dappflow.org/setnetwork?name=${dappFlowNetworkName}&redirect=explorer/account/${activeAddress}/`}
>
<a className="text-xl" target="_blank" href={`https://lora.algokit.io/${networkName}/account/${activeAddress}/`}>
Address: {ellipseAddress(activeAddress)}
</a>
<div className="text-xl">Network: {algoConfig.network === '' ? 'localnet' : algoConfig.network}</div>
<div className="text-xl">Network: {networkName}</div>
</div>
)
}
Expand Down
12 changes: 4 additions & 8 deletions examples/starter_react/src/components/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ const Account = () => {
const { activeAddress } = useWallet()
const algoConfig = getAlgodConfigFromViteEnvironment()

const dappFlowNetworkName = useMemo(() => {
return algoConfig.network === '' ? 'sandbox' : algoConfig.network.toLocaleLowerCase()
const networkName = useMemo(() => {
return algoConfig.network === '' ? 'localnet' : algoConfig.network.toLocaleLowerCase()
}, [algoConfig.network])

return (
<div>
<a
className="text-xl"
target="_blank"
href={`https://app.dappflow.org/setnetwork?name=${dappFlowNetworkName}&redirect=explorer/account/${activeAddress}/`}
>
<a className="text-xl" target="_blank" href={`https://lora.algokit.io/${networkName}/account/${activeAddress}/`}>
Address: {ellipseAddress(activeAddress)}
</a>
<div className="text-xl">Network: {algoConfig.network === '' ? 'localnet' : algoConfig.network}</div>
<div className="text-xl">Network: {networkName}</div>
</div>
)
}
Expand Down
12 changes: 4 additions & 8 deletions template_content/src/components/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,16 @@ const Account = () => {
const { activeAddress } = useWallet()
const algoConfig = getAlgodConfigFromViteEnvironment()

const dappFlowNetworkName = useMemo(() => {
return algoConfig.network === '' ? 'sandbox' : algoConfig.network.toLocaleLowerCase()
const networkName = useMemo(() => {
return algoConfig.network === '' ? 'localnet' : algoConfig.network.toLocaleLowerCase()
}, [algoConfig.network])

return (
<div>
<a
className="text-xl"
target="_blank"
href={`https://app.dappflow.org/setnetwork?name=${dappFlowNetworkName}&redirect=explorer/account/${activeAddress}/`}
>
<a className="text-xl" target="_blank" href={`https://lora.algokit.io/${networkName}/account/${activeAddress}/`}>
Address: {ellipseAddress(activeAddress)}
</a>
<div className="text-xl">Network: {algoConfig.network === '' ? 'localnet' : algoConfig.network}</div>
<div className="text-xl">Network: {networkName}</div>
</div>
)
}
Expand Down

0 comments on commit 3de40ca

Please sign in to comment.