diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 1ecd9a1ef2..24c1f8b192 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -26,7 +26,7 @@ "dcl-catalyst-commons": "^9.0.1", "decentraland-connect": "^5.2.4", "decentraland-crypto-fetch": "^1.0.3", - "decentraland-dapps": "^16.21.5", + "decentraland-dapps": "^16.26.1", "decentraland-transactions": "^1.50.0", "decentraland-ui": "^4.31.0", "dotenv": "^10.0.0", @@ -11001,9 +11001,9 @@ } }, "node_modules/decentraland-dapps": { - "version": "16.21.5", - "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-16.21.5.tgz", - "integrity": "sha512-HcM6sKuMje0Q2bwECCqAmMkvZxG/BKbzSVjH+OdYGSQ7Zaud6W2tgadliM0F6l15LaqCXuDyaD8FyrPtgvAbDw==", + "version": "16.26.1", + "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-16.26.1.tgz", + "integrity": "sha512-8jfMUgnuspF6AzjqVkPo9qZaybXlxGWSlONLNAM2YCAVr/ms5ZGgf9Nj83ZP+fa0Rfbl81m0qQK20Kk93NjOAA==", "dependencies": { "@0xsequence/multicall": "^0.25.1", "@0xsequence/relayer": "^0.25.1", @@ -11019,7 +11019,7 @@ "decentraland-connect": "^5.2.4", "decentraland-crypto-fetch": "^2.0.1", "decentraland-transactions": "^1.47.0", - "decentraland-ui": "^4.31.0", + "decentraland-ui": "^4.33.2", "ethers": "^5.6.8", "events": "^3.3.0", "flat": "^5.0.2", @@ -11132,9 +11132,9 @@ } }, "node_modules/decentraland-ui": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/decentraland-ui/-/decentraland-ui-4.31.0.tgz", - "integrity": "sha512-RHopGNBmsBCaFiVJ58WID1is0L0dnItN0Bc9QOsuvTK19O95TMP1W0I8enHh2dJ5O4nIcSEuCF/50nrcakoh5w==", + "version": "4.33.2", + "resolved": "https://registry.npmjs.org/decentraland-ui/-/decentraland-ui-4.33.2.tgz", + "integrity": "sha512-onZiT65/cybdwqB7dy1p3ZUVkz/1hN0ZXg97usFcPDCk2WNoYULbPqDjpOg+F3TTaSNmTU9QqpJ0pHYF/iaLkg==", "dependencies": { "@dcl/schemas": "^9.10.0", "@dcl/ui-env": "^1.4.0", diff --git a/webapp/package.json b/webapp/package.json index 791ac42c83..666f731f3f 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -20,7 +20,7 @@ "dcl-catalyst-commons": "^9.0.1", "decentraland-connect": "^5.2.4", "decentraland-crypto-fetch": "^1.0.3", - "decentraland-dapps": "^16.21.5", + "decentraland-dapps": "^16.26.1", "decentraland-transactions": "^1.50.0", "decentraland-ui": "^4.31.0", "dotenv": "^10.0.0", @@ -87,7 +87,7 @@ "typescript": "^4.9.3" }, "scripts": { - "start": "react-app-rewired --openssl-legacy-provider start", + "start": "react-app-rewired start", "prebuild": "node scripts/prebuild.js", "build": "CI=false react-scripts --openssl-legacy-provider build", "test": "react-app-rewired test", diff --git a/webapp/src/components/ManageAssetPage/ManageAssetPage.tsx b/webapp/src/components/ManageAssetPage/ManageAssetPage.tsx index 94a1b3ba2d..fc9bf0e890 100644 --- a/webapp/src/components/ManageAssetPage/ManageAssetPage.tsx +++ b/webapp/src/components/ManageAssetPage/ManageAssetPage.tsx @@ -80,7 +80,7 @@ export const ManageAssetPage = (props: Props) => { {(asset, order, rental, isLoading) => ( <> - + onBack()} /> {isLoading ? : null} {!isLoading && !asset ? : null} {!isLoading && diff --git a/webapp/src/components/Navbar/Navbar.container.ts b/webapp/src/components/Navbar/Navbar.container.ts index ddb6ecf71b..24bded8087 100644 --- a/webapp/src/components/Navbar/Navbar.container.ts +++ b/webapp/src/components/Navbar/Navbar.container.ts @@ -4,19 +4,16 @@ import { isPending } from 'decentraland-dapps/dist/modules/transaction/utils' import { RootState } from '../../modules/reducer' import { getTransactions } from '../../modules/transaction/selectors' -import { isConnected } from '../../modules/wallet/selectors' -import { getIsAuthDappEnabled, getIsNewNavbarDropdownEnabled } from '../../modules/features/selectors' +import { getIsAuthDappEnabled } from '../../modules/features/selectors' import { MapStateProps, MapDispatch, MapDispatchProps } from './Navbar.types' import Navbar from './Navbar' import { getCurrentIdentity } from '../../modules/identity/selectors' const mapState = (state: RootState): MapStateProps => ({ - isConnected: isConnected(state), location: getLocation(state), hasPendingTransactions: getTransactions(state).some(tx => isPending(tx.status) ), - isNewNavbarDropdownEnabled: getIsNewNavbarDropdownEnabled(state), identity: getCurrentIdentity(state) || undefined, isAuthDappEnabled: getIsAuthDappEnabled(state) }) diff --git a/webapp/src/components/Navbar/Navbar.tsx b/webapp/src/components/Navbar/Navbar.tsx index 736674b6b9..722a092de4 100644 --- a/webapp/src/components/Navbar/Navbar.tsx +++ b/webapp/src/components/Navbar/Navbar.tsx @@ -2,7 +2,6 @@ import React, { useCallback } from 'react' import { Navbar as BaseNavbar } from 'decentraland-dapps/dist/containers' import { config } from '../../config' import { locations } from '../../modules/routing/locations' -import UserMenu from '../UserMenu' import UserInformation from '../UserInformation' import { Props } from './Navbar.types' import './Navbar.css' @@ -11,23 +10,13 @@ const Navbar = (props: Props) => { const { location, onNavigate, - isConnected, - isNewNavbarDropdownEnabled, isAuthDappEnabled } = props const { pathname, search } = location - if (isConnected) { - props = { - ...props, - rightMenu: - } - } - if (isNewNavbarDropdownEnabled) { - props = { - ...props, - rightMenu: - } + props = { + ...props, + rightMenu: } const handleOnSignIn = useCallback(() => { diff --git a/webapp/src/components/Navbar/Navbar.types.ts b/webapp/src/components/Navbar/Navbar.types.ts index 6980b5150d..1423682df8 100644 --- a/webapp/src/components/Navbar/Navbar.types.ts +++ b/webapp/src/components/Navbar/Navbar.types.ts @@ -5,11 +5,9 @@ import { AuthIdentity } from '@dcl/crypto' export type Props = Partial & { location: RouterLocation - isConnected: boolean hasPendingTransactions: boolean enablePartialSupportAlert?: boolean onNavigate: (path: string) => void - isNewNavbarDropdownEnabled: boolean identity?: AuthIdentity isAuthDappEnabled: boolean } @@ -20,8 +18,6 @@ export type MapStateProps = Pick< Props, | 'location' | 'hasPendingTransactions' - | 'isConnected' - | 'isNewNavbarDropdownEnabled' | 'identity' | 'isAuthDappEnabled' > diff --git a/webapp/src/components/UserMenu/UserMenu.container.ts b/webapp/src/components/UserMenu/UserMenu.container.ts deleted file mode 100644 index 37b6d5a85b..0000000000 --- a/webapp/src/components/UserMenu/UserMenu.container.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { connect } from 'react-redux' -import { getLocation, push } from 'connected-react-router' -import { isPending } from 'decentraland-dapps/dist/modules/transaction/utils' -import { - isConnected, - isConnecting -} from 'decentraland-dapps/dist/modules/wallet/selectors' -import { RootState } from '../../modules/reducer' -import { getTransactions } from '../../modules/transaction/selectors' -import { locations } from '../../modules/routing/locations' -import { MapStateProps, MapDispatch, MapDispatchProps } from './UserMenu.types' -import UserMenu from './UserMenu' - -const mapState = (state: RootState): MapStateProps => { - return { - isSignedIn: isConnected(state), - isSigningIn: isConnecting(state), - isActivity: getLocation(state).pathname === locations.activity(), - hasActivity: getTransactions(state).some(tx => isPending(tx.status)) - } -} - -const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onClickActivity: () => dispatch(push(locations.activity())), - onClickSettings: () => dispatch(push(locations.settings())), - onClickMyAssets: () => dispatch(push(locations.defaultCurrentAccount())), - onClickMyLists: () => dispatch(push(locations.lists())) -}) - -export default connect(mapState, mapDispatch)(UserMenu) diff --git a/webapp/src/components/UserMenu/UserMenu.spec.tsx b/webapp/src/components/UserMenu/UserMenu.spec.tsx deleted file mode 100644 index 2f7922f455..0000000000 --- a/webapp/src/components/UserMenu/UserMenu.spec.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { renderWithProviders } from '../../utils/test' -import UserMenu from './UserMenu' -import { Props as UserMenuProps } from './UserMenu.types' - -function renderUserMenu(props: Partial = {}) { - return renderWithProviders( - - ) -} - -describe('UserMenu', () => { - it('should render the My Assets option in the menu', () => { - const { getByTestId } = renderUserMenu() - expect(getByTestId('my-assets')).toBeInTheDocument() - }) - - it('should render the My Lists option in the menu', () => { - const { getByTestId } = renderUserMenu() - expect(getByTestId('my-lists')).toBeInTheDocument() - }) -}) diff --git a/webapp/src/components/UserMenu/UserMenu.tsx b/webapp/src/components/UserMenu/UserMenu.tsx deleted file mode 100644 index f519dbd6ed..0000000000 --- a/webapp/src/components/UserMenu/UserMenu.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React, { useMemo } from 'react' -import { UserMenu as BaseUserMenu } from 'decentraland-dapps/dist/containers' -import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { Icon } from 'decentraland-ui' -import { Props } from './UserMenu.types' - -const UserMenu = (props: Props) => { - const { onClickMyAssets, onClickMyLists, ...baseProps } = props - - const menuItems = useMemo( - () => ( - <> -
  • - - {t('user_menu.my_assets')} -
  • -
  • - - {t('user_menu.my_lists')} -
  • - - ), - [onClickMyAssets, onClickMyLists] - ) - - return -} - -export default React.memo(UserMenu) diff --git a/webapp/src/components/UserMenu/UserMenu.types.ts b/webapp/src/components/UserMenu/UserMenu.types.ts deleted file mode 100644 index a2877e057d..0000000000 --- a/webapp/src/components/UserMenu/UserMenu.types.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Dispatch } from 'redux' -import { CallHistoryMethodAction } from 'connected-react-router' -import { UserMenuProps } from 'decentraland-ui' - -export type Props = Partial & { - onClickMyAssets: () => void - onClickMyLists: () => void -} - -export type MapStateProps = Pick< - Props, - 'isSignedIn' | 'isSigningIn' | 'isActivity' | 'hasActivity' -> -export type MapDispatchProps = Pick< - Props, - 'onClickActivity' | 'onClickSettings' | 'onClickMyAssets' | 'onClickMyLists' -> -export type MapDispatch = Dispatch diff --git a/webapp/src/components/UserMenu/index.ts b/webapp/src/components/UserMenu/index.ts deleted file mode 100644 index 0be8155610..0000000000 --- a/webapp/src/components/UserMenu/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import UserMenu from './UserMenu.container' - -export default UserMenu