Skip to content

Commit

Permalink
disable expired dapps
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkNerdi committed Jan 22, 2024
1 parent 7d5173d commit f53108a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { localize } from '@core/i18n'
export let dapp: IConnectedDapp
export let classes: string = ''
export let disabled: boolean = false
export let onClick: (() => unknown) | undefined = undefined
$: networkIds = Object.values(
Expand All @@ -16,7 +16,8 @@
</script>

<ClickableTile
classes="bg-surface-0 dark:bg-surface-0-dark border border-solid border-stroke dark:border-stroke-dark {classes}"
classes="bg-surface-0 dark:bg-surface-0-dark border border-solid border-stroke dark:border-stroke-dark"
{disabled}
{onClick}
>
<div class="w-full flex flex-row justify-between items-center p-2 gap-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@
{#if displayedDapps.length}
<div class="h-full flex flex-col scrollable px-6 items-start gap-3">
{#each displayedDapps as dapp}
<DappCard
{dapp}
onClick={() => onDappCardClick(dapp)}
classes={selectedIndex === 1 ? 'opacity-50' : ''}
/>
<DappCard {dapp} disabled={selectedIndex === 1} onClick={() => onDappCardClick(dapp)} />
{/each}
</div>
{:else}
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/src/components/tiles/ClickableTile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<Tile
classes="
{onClick ? 'hover:bg-gray-100 dark:hover:bg-gray-950 cursor-pointer' : 'pointer-events-none'}
{disabled ? 'opacity-50' : ''}
{disabled ? 'opacity-50 pointer-events-none' : ''}
{classes}
"
{...$$restProps}
on:click={onClick}
on:click={() => !disabled && onClick?.()}
>
<slot />
</Tile>

0 comments on commit f53108a

Please sign in to comment.