Skip to content

Commit

Permalink
feat: udpate decentraland dapps (#2087)
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi authored Jan 5, 2024
1 parent f56473a commit 7cb4c21
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 138 deletions.
16 changes: 8 additions & 8 deletions webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/ManageAssetPage/ManageAssetPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const ManageAssetPage = (props: Props) => {
<AssetProvider type={AssetType.NFT} rentalStatus={rentalStatus}>
{(asset, order, rental, isLoading) => (
<>
<Back className="back" absolute onClick={onBack} />
<Back className="back" absolute onClick={() => onBack()} />
{isLoading ? <Loading /> : null}
{!isLoading && !asset ? <NotFound /> : null}
{!isLoading &&
Expand Down
5 changes: 1 addition & 4 deletions webapp/src/components/Navbar/Navbar.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down
17 changes: 3 additions & 14 deletions webapp/src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -11,23 +10,13 @@ const Navbar = (props: Props) => {
const {
location,
onNavigate,
isConnected,
isNewNavbarDropdownEnabled,
isAuthDappEnabled
} = props
const { pathname, search } = location

if (isConnected) {
props = {
...props,
rightMenu: <UserMenu />
}
}
if (isNewNavbarDropdownEnabled) {
props = {
...props,
rightMenu: <UserInformation identity={props.identity} withNotifications />
}
props = {
...props,
rightMenu: <UserInformation identity={props.identity} withNotifications />
}

const handleOnSignIn = useCallback(() => {
Expand Down
4 changes: 0 additions & 4 deletions webapp/src/components/Navbar/Navbar.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import { AuthIdentity } from '@dcl/crypto'

export type Props = Partial<NavbarProps> & {
location: RouterLocation<unknown>
isConnected: boolean
hasPendingTransactions: boolean
enablePartialSupportAlert?: boolean
onNavigate: (path: string) => void
isNewNavbarDropdownEnabled: boolean
identity?: AuthIdentity
isAuthDappEnabled: boolean
}
Expand All @@ -20,8 +18,6 @@ export type MapStateProps = Pick<
Props,
| 'location'
| 'hasPendingTransactions'
| 'isConnected'
| 'isNewNavbarDropdownEnabled'
| 'identity'
| 'isAuthDappEnabled'
>
Expand Down
30 changes: 0 additions & 30 deletions webapp/src/components/UserMenu/UserMenu.container.ts

This file was deleted.

26 changes: 0 additions & 26 deletions webapp/src/components/UserMenu/UserMenu.spec.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions webapp/src/components/UserMenu/UserMenu.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions webapp/src/components/UserMenu/UserMenu.types.ts

This file was deleted.

3 changes: 0 additions & 3 deletions webapp/src/components/UserMenu/index.ts

This file was deleted.

0 comments on commit 7cb4c21

Please sign in to comment.