Skip to content

Commit

Permalink
feat: add notifications to marketplace (#2069)
Browse files Browse the repository at this point in the history
* feat: add notifications

* chore: bump deps

* update package-lock

* fix: workflow

* feat: update

* chore: bump libs

* chore: bump libs

---------

Co-authored-by: Mariano Goldman <mariano.goldman@decentraland.org>
  • Loading branch information
lauti7 and marianogoldman committed Dec 11, 2023
1 parent 732cd87 commit f67cf39
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 44 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ jobs:
working-directory: ./webapp
steps:
- uses: actions/checkout@master
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install
run: npm ci
run: npm ci --legacy-peer-deps
- name: Audit signatures
run: npm audit signatures
53 changes: 17 additions & 36 deletions webapp/package-lock.json

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

4 changes: 2 additions & 2 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"dcl-catalyst-commons": "^9.0.1",
"decentraland-connect": "^5.1.0",
"decentraland-crypto-fetch": "^1.0.3",
"decentraland-dapps": "^16.18.0",
"decentraland-dapps": "^16.19.3",
"decentraland-transactions": "^1.50.0",
"decentraland-ui": "^4.29.0",
"decentraland-ui": "^4.30.4",
"dotenv": "^10.0.0",
"ethers": "^5.6.8",
"graphql": "^14.7.0",
Expand Down
4 changes: 3 additions & 1 deletion webapp/src/components/Navbar/Navbar.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ import { isConnected } from '../../modules/wallet/selectors'
import { getIsNewNavbarDropdownEnabled } 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)
isNewNavbarDropdownEnabled: getIsNewNavbarDropdownEnabled(state),
identity: getCurrentIdentity(state) || undefined
})

const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Navbar = (props: Props) => {
if (isNewNavbarDropdownEnabled) {
props = {
...props,
rightMenu: <UserInformation />
rightMenu: <UserInformation identity={props.identity} withNotifications />
}
}

Expand All @@ -45,6 +45,7 @@ const Navbar = (props: Props) => {
return (
<BaseNavbar
{...props}
withNotifications
activePage="marketplace"
isFullscreen={props.isFullscreen}
isSignIn={pathname === locations.signIn()}
Expand Down
3 changes: 3 additions & 0 deletions webapp/src/components/Navbar/Navbar.types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Dispatch } from 'redux'
import { CallHistoryMethodAction, RouterLocation } from 'connected-react-router'
import { NavbarProps } from 'decentraland-ui'
import { AuthIdentity } from '@dcl/crypto'

export type Props = Partial<NavbarProps> & {
location: RouterLocation<unknown>
Expand All @@ -9,6 +10,7 @@ export type Props = Partial<NavbarProps> & {
enablePartialSupportAlert?: boolean
onNavigate: (path: string) => void
isNewNavbarDropdownEnabled: boolean
identity?: AuthIdentity
}

export type OwnProps = Pick<Props, 'enablePartialSupportAlert'>
Expand All @@ -19,6 +21,7 @@ export type MapStateProps = Pick<
| 'hasPendingTransactions'
| 'isConnected'
| 'isNewNavbarDropdownEnabled'
| 'identity'
>
export type MapDispatchProps = Pick<Props, 'onNavigate'>
export type MapDispatch = Dispatch<CallHistoryMethodAction>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Dispatch } from 'redux'
import { CallHistoryMethodAction } from 'connected-react-router'
import { UserInformationComponentProps } from 'decentraland-ui'
import { UserInformationProps } from 'decentraland-dapps/dist/containers/UserInformation/UserInformation.types'
import { OpenLoginAction } from '../../modules/login/actions'

export type Props = Partial<UserInformationComponentProps> & {
export type Props = Partial<UserInformationProps> & {
onClickMyAssets: () => void
onClickMyLists: () => void
}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/themes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import 'decentraland-ui/lib/styles.css'

// Theme
import 'decentraland-ui/lib/dark-theme.css'
import 'decentraland-ui/dist/themes/alternative/dark-theme.css'

// Overrides
import './components/Button.css'
Expand Down

0 comments on commit f67cf39

Please sign in to comment.