From 90944fe283d93a730a85b97cd55be381474d5824 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio Date: Mon, 4 Mar 2024 13:18:26 -0300 Subject: [PATCH] fix: Remove emotes v2 FTU --- .../EmotesV2LaunchModal.container.ts | 15 ---- .../EmotesV2LaunchModal.module.css | 38 --------- .../EmotesV2LaunchModal.tsx | 81 ------------------- .../EmotesV2LaunchModal.types.ts | 9 --- .../Modals/FTU/EmotesV2LaunchModal/index.ts | 3 - webapp/src/modules/features/selectors.spec.ts | 6 -- webapp/src/modules/features/selectors.ts | 11 --- 7 files changed, 163 deletions(-) delete mode 100644 webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.container.ts delete mode 100644 webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.module.css delete mode 100644 webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.tsx delete mode 100644 webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.types.ts delete mode 100644 webapp/src/components/Modals/FTU/EmotesV2LaunchModal/index.ts diff --git a/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.container.ts b/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.container.ts deleted file mode 100644 index a6a7d3a129..0000000000 --- a/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.container.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { connect } from 'react-redux' -import { isLoadingFeatureFlags } from 'decentraland-dapps/dist/modules/features/selectors' -import { RootState } from '../../../../modules/reducer' -import { getIsEmotesV2FTUEnabled } from '../../../../modules/features/selectors' -import { MapStateProps } from './EmotesV2LaunchModal.types' -import { EmotesV2LaunchModal } from './EmotesV2LaunchModal' - -const mapState = (state: RootState): MapStateProps => { - return { - isLoadingFeatureFlags: isLoadingFeatureFlags(state), - isEmotesV2FTUEnabled: getIsEmotesV2FTUEnabled(state) - } -} - -export default connect(mapState, {})(EmotesV2LaunchModal) diff --git a/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.module.css b/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.module.css deleted file mode 100644 index 652ab24ee5..0000000000 --- a/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.module.css +++ /dev/null @@ -1,38 +0,0 @@ -.emoteV2Modal :global(.dcl.modal-navigation-title) { - font-size: 20px; - font-weight: 600; - margin-top: 25px; -} - -.container { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - gap: 15px; - padding: 25px; - padding-bottom: 40px; -} - -.subtitle { - text-align: center; - line-height: 20px; - font-size: 14px; - max-width: 500px; - margin-bottom: 20px; -} - -.actionButton { - width: 100%; - max-width: 380px; -} - -:global(.ui.button).actionButton + :global(.ui.button).actionButton { - margin: 0; -} - -.video { - display: block; - height: 250px; - object-fit: cover; -} diff --git a/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.tsx b/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.tsx deleted file mode 100644 index 3ef50e7525..0000000000 --- a/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import { useCallback, useEffect, useState } from 'react' -import { Link } from 'react-router-dom' -import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { Modal, Button, ModalNavigation } from 'decentraland-ui' -import { locations } from '../../../../modules/routing/locations' -import { Section } from '../../../../modules/vendor/decentraland' -import { Props } from './EmotesV2LaunchModal.types' -import styles from './EmotesV2LaunchModal.module.css' - -const EMOTES_V2_FTU_KEY = 'emotes-v2-ftu-key' - -export const EmotesV2LaunchModal = ({ - isEmotesV2FTUEnabled, - isLoadingFeatureFlags -}: Props) => { - const [isOpen, setIsOpen] = useState(false) - - const onClose = useCallback(() => { - localStorage.setItem(EMOTES_V2_FTU_KEY, 'true') - setIsOpen(false) - }, []) - - useEffect(() => { - if ( - !isLoadingFeatureFlags && - isEmotesV2FTUEnabled && - !localStorage.getItem(EMOTES_V2_FTU_KEY) - ) { - setIsOpen(true) - } - }, [isLoadingFeatureFlags, isEmotesV2FTUEnabled]) - - return ( - - -
-
-
- ) -} diff --git a/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.types.ts b/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.types.ts deleted file mode 100644 index 80f6910760..0000000000 --- a/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/EmotesV2LaunchModal.types.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type Props = { - isLoadingFeatureFlags: boolean - isEmotesV2FTUEnabled: boolean -} - -export type MapStateProps = Pick< - Props, - 'isEmotesV2FTUEnabled' | 'isLoadingFeatureFlags' -> diff --git a/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/index.ts b/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/index.ts deleted file mode 100644 index 8a229eccd0..0000000000 --- a/webapp/src/components/Modals/FTU/EmotesV2LaunchModal/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import EmotesV2LaunchModal from "./EmotesV2LaunchModal.container"; - -export default EmotesV2LaunchModal diff --git a/webapp/src/modules/features/selectors.spec.ts b/webapp/src/modules/features/selectors.spec.ts index da3762f09f..54e30a946c 100644 --- a/webapp/src/modules/features/selectors.spec.ts +++ b/webapp/src/modules/features/selectors.spec.ts @@ -10,7 +10,6 @@ import { getIsCampaignBrowserEnabled, getIsCampaignCollectionsBannerEnabled, getIsCampaignHomepageBannerEnabled, - getIsEmotesV2FTUEnabled, getIsMaintenanceEnabled, getIsMarketplaceLaunchPopupEnabled, getIsSmartWearablesFTUEnabled, @@ -153,11 +152,6 @@ const waitForInitialLoadingSelectors = [ feature: FeatureName.SMART_WEARABLES_FTU, selector: getIsSmartWearablesFTUEnabled }, - { - name: 'isEmotesV2FTU', - feature: FeatureName.EMOTES_V2_FTU, - selector: getIsEmotesV2FTUEnabled - }, { name: 'ens-address', feature: FeatureName.ENS_ADDRESS, diff --git a/webapp/src/modules/features/selectors.ts b/webapp/src/modules/features/selectors.ts index bb59574174..f86877222f 100644 --- a/webapp/src/modules/features/selectors.ts +++ b/webapp/src/modules/features/selectors.ts @@ -86,17 +86,6 @@ export const getIsSmartWearablesFTUEnabled = (state: RootState) => { return false } -export const getIsEmotesV2FTUEnabled = (state: RootState) => { - if (hasLoadedInitialFlags(state)) { - return getIsFeatureEnabled( - state, - ApplicationName.MARKETPLACE, - FeatureName.EMOTES_V2_FTU - ) - } - return false -} - export const getIsMarketplaceServerEnabled = (state: RootState) => { if (hasLoadedInitialFlags(state)) { return getIsFeatureEnabled(