Skip to content

Commit

Permalink
fix: Remove emotes v2, smart items and worlds for ens owners FFs
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio committed Jan 19, 2024
1 parent 0002080 commit 27c4291
Show file tree
Hide file tree
Showing 28 changed files with 133 additions and 875 deletions.
3 changes: 1 addition & 2 deletions src/components/CollectionsPage/CollectionsPage.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { setCollectionPageView } from 'modules/ui/collection/actions'
import { getCollectionPageView } from 'modules/ui/collection/selectors'
import { isThirdPartyManager } from 'modules/thirdParty/selectors'
import { fetchItemsRequest, fetchOrphanItemRequest, FETCH_ITEMS_REQUEST, FETCH_ORPHAN_ITEM_REQUEST } from 'modules/item/actions'
import { getEmotesV2Enabled, getIsCampaignEnabled } from 'modules/features/selectors'
import { getIsCampaignEnabled } from 'modules/features/selectors'
import { fetchCollectionsRequest, FETCH_COLLECTIONS_REQUEST } from 'modules/collection/actions'
import { MapStateProps, MapDispatchProps, MapDispatch } from './CollectionsPage.types'
import CollectionsPage from './CollectionsPage'
Expand All @@ -39,7 +39,6 @@ const mapState = (state: RootState): MapStateProps => {
isLoadingItems: isLoadingType(getLoadingItems(state), FETCH_ITEMS_REQUEST),
isLoadingOrphanItem: isLoadingType(getLoadingItems(state), FETCH_ORPHAN_ITEM_REQUEST),
isCampaignEnabled: getIsCampaignEnabled(state),
isEmotesV2Enabled: getEmotesV2Enabled(state),
hasUserOrphanItems: hasUserOrphanItems(state)
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/CollectionsPage/CollectionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class CollectionsPage extends React.PureComponent<Props> {
}

componentDidMount() {
const { address, hasUserOrphanItems, isEmotesV2Enabled, onFetchCollections, onFetchOrphanItem, onOpenModal } = this.props
const { address, hasUserOrphanItems, onFetchCollections, onFetchOrphanItem, onOpenModal } = this.props
// fetch if already connected
if (address) {
onFetchCollections(address, { page: 1, limit: PAGE_SIZE, sort: CurationSortOptions.CREATED_AT_DESC })
Expand All @@ -50,7 +50,7 @@ export default class CollectionsPage extends React.PureComponent<Props> {
onFetchOrphanItem(address)
}

if (isEmotesV2Enabled && !localStorage.getItem(LOCALSTORAGE_EMOTES_V2_ANNOUCEMENT)) {
if (!localStorage.getItem(LOCALSTORAGE_EMOTES_V2_ANNOUCEMENT)) {
onOpenModal('EmotesV2AnnouncementModal')
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/components/CollectionsPage/CollectionsPage.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export type Props = {
isLoadingItems: boolean
isLoadingOrphanItem: boolean
isCampaignEnabled: boolean
isEmotesV2Enabled: boolean
hasUserOrphanItems: boolean | undefined
onNavigate: (path: string) => void
onSetView: typeof setCollectionPageView
Expand All @@ -50,7 +49,6 @@ export type MapStateProps = Pick<
| 'isLoadingItems'
| 'isLoadingOrphanItem'
| 'isCampaignEnabled'
| 'isEmotesV2Enabled'
| 'hasUserOrphanItems'
>
export type MapDispatchProps = Pick<
Expand Down
4 changes: 1 addition & 3 deletions src/components/InspectorPage/InspectorPage.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { getCurrentScene } from 'modules/scene/selectors'
import { getCurrentProject } from 'modules/project/selectors'
import { connectInspector, openInspector } from 'modules/inspector/actions'
import { isReloading } from 'modules/inspector/selectors'
import { getIsSmartItemsEnabled } from 'modules/features/selectors'
import { MapStateProps, MapDispatch, MapDispatchProps } from './InspectorPage.types'
import EditorPage from './InspectorPage'

Expand All @@ -16,8 +15,7 @@ const mapState = (state: RootState): MapStateProps => {
isLoggedIn: isLoggedIn(state),
scene: getCurrentScene(state),
project: getCurrentProject(state),
isReloading: isReloading(state),
isSmartItemsEnabled: getIsSmartItemsEnabled(state)
isReloading: isReloading(state)
}
}

Expand Down
6 changes: 1 addition & 5 deletions src/components/InspectorPage/InspectorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class InspectorPage extends React.PureComponent<Props, State> {
}

render() {
const { scene, project, isLoggedIn, isReloading, isSmartItemsEnabled, address = '' } = this.props
const { scene, project, isLoggedIn, isReloading, address = '' } = this.props

if (!isLoggedIn) {
return <SignInRequired />
Expand Down Expand Up @@ -67,10 +67,6 @@ export default class InspectorPage extends React.PureComponent<Props, State> {
queryParams = queryParams.concat(`&projectId=${project.id}`)
}

if (!isSmartItemsEnabled) {
queryParams = queryParams.concat('&disableSmartItems')
}

return (
<div className="InspectorPage">
{(!this.state.isLoaded || isReloading) && <Loader active />}
Expand Down
3 changes: 1 addition & 2 deletions src/components/InspectorPage/InspectorPage.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export type Props = {
project?: Project | null
isLoggedIn: boolean
isReloading: boolean
isSmartItemsEnabled: boolean
onOpen: typeof openInspector
onConnect: typeof connectInspector
}
Expand All @@ -18,6 +17,6 @@ export type State = {
isLoaded: boolean
}

export type MapStateProps = Pick<Props, 'isLoggedIn' | 'scene' | 'project' | 'isReloading' | 'isSmartItemsEnabled' | 'address'>
export type MapStateProps = Pick<Props, 'isLoggedIn' | 'scene' | 'project' | 'isReloading' | 'address'>
export type MapDispatchProps = Pick<Props, 'onOpen' | 'onConnect'>
export type MapDispatch = Dispatch<OpenInspectorAction | ConnectInspectorAction>
4 changes: 1 addition & 3 deletions src/components/Modals/DeployModal/DeployModal.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ import { getCurrentProject } from 'modules/project/selectors'
import { getData as getDeployments } from 'modules/deployment/selectors'
import { getActivePoolGroup } from 'modules/poolGroup/selectors'
import { getCurrentScene } from 'modules/scene/selectors'
import { getIsWorldsForEnsOwnersEnabled } from 'modules/features/selectors'
import { MapStateProps, OwnProps } from './DeployModal.types'
import DeployModal from './DeployModal'

const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => ({
deployment: getDeployments(state)[ownProps.metadata.projectId],
currentPoolGroup: getActivePoolGroup(state),
project: getCurrentProject(state),
scene: getCurrentScene(state),
isWorldsForEnsOwnersEnabled: getIsWorldsForEnsOwnersEnabled(state)
scene: getCurrentScene(state)
})

export default connect(mapState)(DeployModal)
9 changes: 2 additions & 7 deletions src/components/Modals/DeployModal/DeployModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Icon from 'components/Icon'
import DeployToLand from './DeployToLand'
import DeployToPool from './DeployToPool'
import DeployToWorld from './DeployToWorld'
import DeployToWorldWorldsForEnsOwners from './DeployToWorld_WorldsForEnsOwnersFeature'
import ClearDeployment from './ClearDeployment'
import { Props, State, DeployModalView } from './DeployModal.types'
import './DeployModal.css'
Expand Down Expand Up @@ -133,7 +132,7 @@ export default class DeployModal extends React.PureComponent<Props, State> {

render() {
const { view, deploymentId, claimedName } = this.state
const { name, currentPoolGroup, scene, isWorldsForEnsOwnersEnabled } = this.props
const { name, currentPoolGroup, scene } = this.props

if (view === DeployModalView.CLEAR_DEPLOYMENT && deploymentId) {
return <ClearDeployment deploymentId={deploymentId} name={name} onClose={this.handleClose} />
Expand All @@ -157,11 +156,7 @@ export default class DeployModal extends React.PureComponent<Props, State> {
}

if (view === DeployModalView.DEPLOY_TO_WORLD) {
return isWorldsForEnsOwnersEnabled ? (
<DeployToWorldWorldsForEnsOwners claimedName={claimedName} name={name} onClose={this.handleClose} onBack={this.handleBack} />
) : (
<DeployToWorld claimedName={claimedName} name={name} onClose={this.handleClose} onBack={this.handleBack} />
)
return <DeployToWorld claimedName={claimedName} name={name} onClose={this.handleClose} onBack={this.handleBack} />
}

return this.renderChoiceForm()
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modals/DeployModal/DeployModal.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export type Step = {
}

export type OwnProps = Pick<Props, 'metadata'>
export type MapStateProps = Pick<Props, 'deployment' | 'currentPoolGroup' | 'project' | 'scene' | 'isWorldsForEnsOwnersEnabled'>
export type MapStateProps = Pick<Props, 'deployment' | 'currentPoolGroup' | 'project' | 'scene'>

export enum DeployModalView {
NONE = 'NONE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { connect } from 'react-redux'
import { push, replace } from 'connected-react-router'
import { RootState } from 'modules/common/types'
import { getCurrentProject } from 'modules/project/selectors'
import { getENSByWallet } from 'modules/ens/selectors'
import { getENSByWallet, getExternalNamesForConnectedWallet } from 'modules/ens/selectors'
import { deployToWorldRequest } from 'modules/deployment/actions'
import { getCurrentMetrics } from 'modules/scene/selectors'
import { recordMediaRequest } from 'modules/media/actions'
Expand All @@ -12,15 +12,18 @@ import { MapDispatch, MapDispatchProps, MapStateProps } from './DeployToWorld.ty

import DeployToWorld from './DeployToWorld'

const mapState = (state: RootState): MapStateProps => ({
ensList: getENSByWallet(state),
project: getCurrentProject(state) as Project,
metrics: getCurrentMetrics(state),
deployments: getDeploymentsByWorlds(state),
deploymentProgress: getUploadProgress(state),
error: getError(state),
isLoading: isLoading(state)
})
const mapState = (state: RootState): MapStateProps => {
return {
ensList: getENSByWallet(state),
externalNames: getExternalNamesForConnectedWallet(state),
project: getCurrentProject(state) as Project,
metrics: getCurrentMetrics(state),
deployments: getDeploymentsByWorlds(state),
deploymentProgress: getUploadProgress(state),
error: getError(state),
isLoading: isLoading(state)
}
}

const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({
onPublish: (projectId: string, name: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@
width: 375px;
}

.nameTypeOption {
display: flex;
gap: 0.5rem;
align-items: center;
}

.modalForm .worldDetailsDescription {
color: var(--text);
font-size: 14px;
Expand Down
Loading

0 comments on commit 27c4291

Please sign in to comment.