diff --git a/packages/desktop/views/dashboard/collectibles/Collectibles.svelte b/packages/desktop/views/dashboard/collectibles/Collectibles.svelte index eef514e153..18a13d99e2 100644 --- a/packages/desktop/views/dashboard/collectibles/Collectibles.svelte +++ b/packages/desktop/views/dashboard/collectibles/Collectibles.svelte @@ -6,7 +6,7 @@ import { CollectiblesDetailsView, CollectiblesGalleryView, CollectionsGalleryView } from './views' import { selectedCollectiblesTab } from '@core/nfts/stores' - $: $selectedAccountIndex !== undefined && $collectiblesRouter.reset() + $: $selectedAccountIndex !== undefined && $collectiblesRouter?.reset() $: if (features.analytics.dashboardRoute.collectibles.enabled && $collectiblesRoute) { Platform.trackEvent('collectibles-route', { route: $collectiblesRoute }) @@ -15,9 +15,9 @@
{#if $collectiblesRoute === CollectiblesRoute.Gallery} - {#if $selectedCollectiblesTab?.key === 'collectibles'} + {#if $selectedCollectiblesTab === 0} - {:else if $selectedCollectiblesTab?.key === 'collections'} + {:else if $selectedCollectiblesTab === 1} {/if} {/if} diff --git a/packages/desktop/views/dashboard/collectibles/components/CollectiblesTabs.svelte b/packages/desktop/views/dashboard/collectibles/components/CollectiblesTabs.svelte index fb63733aa7..24f87e99bc 100644 --- a/packages/desktop/views/dashboard/collectibles/components/CollectiblesTabs.svelte +++ b/packages/desktop/views/dashboard/collectibles/components/CollectiblesTabs.svelte @@ -1,13 +1,24 @@ {#if COLLECTIBLES_TABS.length > 1}
- +
{/if} diff --git a/packages/shared/src/lib/core/nfts/constants/collectibles-tabs.constant.ts b/packages/shared/src/lib/core/nfts/constants/collectibles-tabs.constant.ts deleted file mode 100644 index ca61211895..0000000000 --- a/packages/shared/src/lib/core/nfts/constants/collectibles-tabs.constant.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { KeyValue } from '@ui' -import features from '@features/features' - -export const COLLECTIBLES_TABS: KeyValue[] = [ - { key: 'collectibles', value: 'Collectibles' }, - ...(features.collectibles?.collections.enabled ? [{ key: 'collections', value: 'Collections' }] : []), -] diff --git a/packages/shared/src/lib/core/nfts/constants/index.ts b/packages/shared/src/lib/core/nfts/constants/index.ts index 9461c813cf..0e1c3f468d 100644 --- a/packages/shared/src/lib/core/nfts/constants/index.ts +++ b/packages/shared/src/lib/core/nfts/constants/index.ts @@ -1,4 +1,3 @@ -export * from './collectibles-tabs.constant' export * from './current-irc27-version.constant' export * from './default-nft-filter.constant' export * from './default-nft-name.constant' diff --git a/packages/shared/src/lib/core/nfts/stores/selected-collectibles-tabs.store.ts b/packages/shared/src/lib/core/nfts/stores/selected-collectibles-tabs.store.ts index 747434e270..ab5b20a1cc 100644 --- a/packages/shared/src/lib/core/nfts/stores/selected-collectibles-tabs.store.ts +++ b/packages/shared/src/lib/core/nfts/stores/selected-collectibles-tabs.store.ts @@ -1,5 +1,3 @@ -import { KeyValue } from '@ui' import { Writable, writable } from 'svelte/store' -import { COLLECTIBLES_TABS } from '../constants' -export const selectedCollectiblesTab: Writable> = writable(COLLECTIBLES_TABS[0]) +export const selectedCollectiblesTab: Writable = writable(0)