Skip to content

Commit

Permalink
Merge branch 'master' into fix/remove-ens-resolver-ffs
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio committed Mar 4, 2024
2 parents 0ea9b12 + 804d0c8 commit 5ac8066
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 20 deletions.
4 changes: 1 addition & 3 deletions src/components/Navbar/Navbar.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ import { push } from 'connected-react-router'
import { isPending } from 'decentraland-dapps/dist/modules/transaction/utils'
import { isLoggedIn } from 'modules/identity/selectors'
import { RootState } from 'modules/common/types'
import { getIsNewNavbarDropdownEnabled } from 'modules/features/selectors'
import { getTransactions } from 'modules/transaction/selectors'
import { locations } from 'routing/locations'
import { MapStateProps, MapDispatchProps, MapDispatch, OwnProps } from './Navbar.types'
import Navbar from './Navbar'

const mapState = (state: RootState): MapStateProps => ({
hasPendingTransactions: getTransactions(state).some(tx => isPending(tx.status)),
isSignedIn: isLoggedIn(state),
isNewNavbarEnabled: getIsNewNavbarDropdownEnabled(state)
isSignedIn: isLoggedIn(state)
})

const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({
Expand Down
4 changes: 2 additions & 2 deletions src/components/Navbar/Navbar.types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { NavbarProps } from 'decentraland-dapps/dist/containers/Navbar/Navbar.types'
import { Dispatch } from 'redux'

export type Props = Partial<NavbarProps> & { isNewNavbarEnabled: boolean; hasPendingTransactions: boolean }
export type Props = Partial<NavbarProps> & { hasPendingTransactions: boolean }

export type MapStateProps = Pick<Props, 'hasPendingTransactions' | 'isSignedIn' | 'isNewNavbarEnabled'>
export type MapStateProps = Pick<Props, 'hasPendingTransactions' | 'isSignedIn'>
export type MapDispatchProps = Pick<Props, 'onSignIn'>
export type MapDispatch = Dispatch
export type OwnProps = Partial<Props>
8 changes: 0 additions & 8 deletions src/modules/features/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ export const getIsCampaignEnabled = (state: RootState) => {
}
}

export const getIsNewNavbarDropdownEnabled = (state: RootState) => {
try {
return getIsFeatureEnabled(state, ApplicationName.BUILDER, FeatureName.NEW_NAVBAR_DROPDOWN)
} catch (e) {
return false
}
}

export const getIsSDK7TemplatesEnabled = (state: RootState) => {
try {
return getIsFeatureEnabled(state, ApplicationName.BUILDER, FeatureName.SDK7_TEMPLATES)
Expand Down
7 changes: 0 additions & 7 deletions src/modules/features/types.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
export enum FeatureName {
MAINTENANCE = 'maintenance',
RENTALS = 'rentals',
CAMPAIGN = 'campaign',
DCL_CONTROLLER_V2 = 'dcl-controller-v2',
NEW_NAVBAR_DROPDOWN = 'new-navbar-dropdown',
EMOTES_V2 = 'emotes-2.0',
SMART_ITEMS = 'smart-items',
WORLDS_FOR_ENS_OWNERS = 'worlds-for-ens-owners',
SDK7_TEMPLATES = 'sdk7-templates',
CREATE_SCENE_ONLY_SDK7 = 'create-scene-only-sdk7',
AUTH_DAPP = 'auth-dapp',
ENS_ADDRESS = 'ens-address'
}

0 comments on commit 5ac8066

Please sign in to comment.