forked from dapperlabs/kitty-items-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dapperlabs#12 from dapperlabs/qvvg/paths
Qvvg/paths
- Loading branch information
Showing
10 changed files
with
117 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import {Bar, Label} from "../display/bar.comp" | ||
import {useConfig} from "../hooks/use-config.hook" | ||
|
||
const Link = ({address, name}) => { | ||
const env = useConfig("env") | ||
|
||
return ( | ||
<li> | ||
{name}:{" "} | ||
<a href={fvs(env, address, name)} target="_blank" rel="noreferrer"> | ||
{address} | ||
</a> | ||
</li> | ||
) | ||
} | ||
|
||
export function ContractsCluster() { | ||
const kibble = useConfig("0xKibble") | ||
const items = useConfig("0xKittyItems") | ||
const market = useConfig("0xKittyItemsMarket") | ||
|
||
return ( | ||
<div> | ||
<Bar> | ||
<Label>Contracts</Label> | ||
</Bar> | ||
<ul> | ||
<Link address={kibble} name="Kibble" /> | ||
<Link address={items} name="KittyItems" /> | ||
<Link address={market} name="KittyItemsMarket" /> | ||
</ul> | ||
</div> | ||
) | ||
} | ||
|
||
export default function WrappedContractsCluster() { | ||
return <ContractsCluster /> | ||
} | ||
|
||
function fvs(env, addr, contract) { | ||
return `https://flow-view-source.com/${env}/account/${addr}/contract/${contract}` | ||
} |