-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Grid mode
- Loading branch information
Showing
19 changed files
with
720 additions
and
458 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
File renamed without changes.
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,41 @@ | ||
<script lang="ts"> | ||
// import { displayedTokenID } from "main/diplayedNft"; | ||
import Nft from "../Nft/Nft.svelte"; | ||
import NftList from "../Nft/NftList.svelte"; | ||
export let chainId: number; | ||
export let address: string; | ||
export let account: string; | ||
export let platform: string; | ||
export let refreshing: boolean = false; | ||
export let refresh: number; | ||
let tokenID: string = ""; | ||
$: account && chainId && address && handleChange(); | ||
const handleChange = () => (tokenID = ""); | ||
const handleClick = (evt: Event) => { | ||
const evtTarget = evt.target as HTMLInputElement; | ||
if (!evtTarget.classList.contains("btn")) { | ||
if (evtTarget.closest("div [data-tokenid]")) { | ||
evt.preventDefault(); | ||
tokenID = evtTarget.closest("div [data-tokenid]").getAttribute("data-tokenid"); | ||
} else if (evtTarget.getAttribute("data-back") === "backtocoll") { | ||
evt.preventDefault(); | ||
tokenID = ""; | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<div on:click={(evt) => handleClick(evt)}> | ||
{#if tokenID} | ||
<Nft {chainId} {address} {tokenID} {account} {platform} /> | ||
{:else} | ||
{#key address} | ||
<NftList {chainId} {address} {account} {refresh} bind:refreshing {platform} /> | ||
{/key} | ||
{/if} | ||
</div> |
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
Oops, something went wrong.