Skip to content

Commit

Permalink
Improvement/feature flags cleanup (#1908)
Browse files Browse the repository at this point in the history
* Cleanup dotphin feature flags

* Removed coming soon

* Fix
  • Loading branch information
smakhtin authored Oct 23, 2024
1 parent c079fd3 commit 87e935a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 39 deletions.
7 changes: 1 addition & 6 deletions apps/verification-portal/src/lib/features/MultipassStates.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { writable, derived } from 'svelte/store';
import type { DeepAsset } from '@sni/types';

import { isFeatureEnabled } from '$lib/shared/utils';

const canEvolve = isFeatureEnabled('dotphinEvolution');

import {
MAX_EVOLUTION_LEVEL,
initialStepConfig,
Expand Down Expand Up @@ -142,8 +138,7 @@ export const multipassStepConfig = derived(

// Retrieve the disabled status from the initial configuration
const nftDisabled = initialStepConfig.nft.disabled;
const evolutionDisabled =
initialStepConfig.evolution.disabled && !canEvolve;
const evolutionDisabled = initialStepConfig.evolution.disabled && false;

// NFT step is locked if the user is logged out or disabled; otherwise, check other conditions
const nftStatus =
Expand Down
5 changes: 2 additions & 3 deletions apps/verification-portal/src/lib/shared/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,9 @@ const en: BaseTranslation = {
CLAIMED: {},
},
evolveStep: {
stepTitle: 'Evolution (coming soon)',
stepTitle: 'Evolution',
INITIAL: {
subtitle:
'Coming soon. You need to have a DOTphin Orbo to start evolving',
subtitle: 'You need to have a DOTphin Orbo to start evolving',
cta: 'Evolve',
moreInfo: 'Read more',
},
Expand Down
8 changes: 4 additions & 4 deletions apps/verification-portal/src/lib/shared/i18n/i18n-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,12 @@ type RootTranslation = {
}
evolveStep: {
/**
* E​v​o​l​u​t​i​o​n​ ​(​c​o​m​i​n​g​ ​s​o​o​n​)
* E​v​o​l​u​t​i​o​n
*/
stepTitle: string
INITIAL: {
/**
* C​o​m​i​n​g​ ​s​o​o​n​.​ ​Y​o​u​ ​n​e​e​d​ ​t​o​ ​h​a​v​e​ ​a​ ​D​O​T​p​h​i​n​ ​O​r​b​o​ ​t​o​ ​s​t​a​r​t​ ​e​v​o​l​v​i​n​g
* Y​o​u​ ​n​e​e​d​ ​t​o​ ​h​a​v​e​ ​a​ ​D​O​T​p​h​i​n​ ​O​r​b​o​ ​t​o​ ​s​t​a​r​t​ ​e​v​o​l​v​i​n​g
*/
subtitle: string
/**
Expand Down Expand Up @@ -1286,12 +1286,12 @@ export type TranslationFunctions = {
}
evolveStep: {
/**
* Evolution (coming soon)
* Evolution
*/
stepTitle: () => LocalizedString
INITIAL: {
/**
* Coming soon. You need to have a DOTphin Orbo to start evolving
* You need to have a DOTphin Orbo to start evolving
*/
subtitle: () => LocalizedString
/**
Expand Down
2 changes: 0 additions & 2 deletions apps/verification-portal/src/lib/shared/siteConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ export default {
feature: {
collectionsTest: false,
multipassTest: false,
dotphinWidget: true,
dotphinEvolution: false,
},
social: {
discord: 'discord:https://discord.gg/ZXyC3tN87K',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
import LL from '$lib/shared/i18n/i18n-svelte';
export let name: string;
export let infoLink: string | undefined;
import { isFeatureEnabled } from '$lib/shared/utils';
const showDotphin = isFeatureEnabled('dotphinWidget');
</script>

<div
Expand Down Expand Up @@ -39,18 +36,15 @@
class="bg-multipass px-12 sm:px-8 md:px-11 py-8 xl:pt-11 col-span-3 flex flex-col sm:flex-row justify-start sm:items-end gap-5"
>
<div class="flex gap-1 flex-col">
{#if !showDotphin}
<span class="text-sm font-aeonik font-bold text-gray-200">
{$LL.assets.multipass.comingSoon()}</span
>
{/if}
<span class="text-sm font-aeonik font-bold text-gray-200">
{$LL.assets.multipass.comingSoon()}</span
>
<Button
color="none"
class="z-50 transition-colors bg-deep-blue-800 hover:bg-primary-400 text-white rounded-sm border-none disabled:opacity-80 !py-2.5 !px-4 text-lg uppercase"
type="button"
tabindex="1"
tabindex={1}
href="/#DOTphin"
disabled={!showDotphin}
>
{$LL.assets.multipass.CTA()}
</Button>
Expand All @@ -61,7 +55,7 @@
color="none"
class="z-50 hover:bg-primary-300 bg-primary-400 text-white rounded-sm border-none !py-2.5 !px-4 text-lg uppercase"
type="button"
tabindex="1"
tabindex={1}
href={infoLink}
target="_blank"
>
Expand Down
19 changes: 6 additions & 13 deletions apps/verification-portal/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
import CollectionsTabs from '$lib/widgets/CollectionTabs/CollectionTabs.svelte';
import DoTphinTimelineWrapper from '$lib/widgets/DOTphin/TimelineWrapper.svelte';
import { LL } from '$lib/shared/i18n/i18n-svelte';
import { isFeatureEnabled } from '$lib/shared/utils';
const showDotphin = isFeatureEnabled('dotphinWidget');
export let data;
</script>
Expand Down Expand Up @@ -39,17 +36,13 @@
>
{$LL.subtitle()}
</span>
{#if showDotphin}
<a
href="/#collections"
class=" text-primary-300 font-aeonik font-regular text-base md:text-[18px] block xl:w-11/12 sm:w-9/12 mx-auto md:mx-0"
>See all collections</a
>
{/if}
<a
href="/#collections"
class=" text-primary-300 font-aeonik font-regular text-base md:text-[18px] block xl:w-11/12 sm:w-9/12 mx-auto md:mx-0"
>See all collections</a
>
</div>
{#if showDotphin}
<DoTphinTimelineWrapper />
{/if}
<DoTphinTimelineWrapper />
<div id="collections" class="px-4 md:px-2 lg:px-0">
<CollectionsTabs>
{#await data.streamed.highlights then highlights}
Expand Down

0 comments on commit 87e935a

Please sign in to comment.