Skip to content

Commit

Permalink
feat: add notifications (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi authored Mar 27, 2024
1 parent 62b1d20 commit a88a203
Show file tree
Hide file tree
Showing 7 changed files with 1,013 additions and 834 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/checkout@master
- name: Use Node.js 18.x
uses: actions/[email protected]
with:
node-version: 18.x
cache: 'npm'
- name: Upgrade npm
run: npm i -g npm
- name: Install
run: npm ci --legacy-peer-deps
- name: Audit signatures
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export default async (): Promise<Config> => {
moduleNameMapper: {
'\\.(css|less)$': 'identity-obj-proxy'
},
transformIgnorePatterns: ['node_modules/(?!(multiformats|uint8arrays|@dcl/single-sign-on-client|decentraland-connect|uuid)/)']
transformIgnorePatterns: ['node_modules/(?!(multiformats|uint8arrays|@dcl/single-sign-on-client|decentraland-connect|uuid|decentraland-dapps)/)']
}
}
1,820 changes: 994 additions & 826 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"@sentry/react": "^7.67.0",
"ajv": "^8.12.0",
"classnames": "^2.3.2",
"decentraland-dapps": "^17.6.0",
"decentraland-ui": "^5.6.0",
"decentraland-dapps": "^19.3.4",
"decentraland-ui": "^5.14.0",
"ethers": "^6.6.5",
"p-queue": "^6.6.2",
"qrcode.react": "^3.1.0",
Expand Down Expand Up @@ -89,4 +89,4 @@
"url": "https://github.com/decentraland/profile.git"
},
"homepage": ""
}
}
4 changes: 3 additions & 1 deletion src/components/Navbar/Navbar.container.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { connect } from 'react-redux'
import { getPendingTransactions } from 'decentraland-dapps/dist/modules/transaction/selectors'
import { getAddress, isConnected } from 'decentraland-dapps/dist/modules/wallet/selectors'
import { getCurrentIdentity } from '../../modules/identity/selector'
import { RootState } from '../../modules/reducer'
import Navbar from './Navbar'
import { MapStateProps } from './Navbar.types'
Expand All @@ -9,7 +10,8 @@ const mapState = (state: RootState): MapStateProps => {
const address = getAddress(state)
return {
hasActivity: address ? getPendingTransactions(state, address).length > 0 : false,
isConnected: isConnected(state)
isConnected: isConnected(state),
identity: getCurrentIdentity(state) || undefined
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Navbar = (props: Props) => {
window.location.replace(`${AUTH_URL}?redirectTo=${window.location.href}`)
}, [])

return <BaseNavbar {...props} onSignIn={handleSignIn} />
return <BaseNavbar {...props} onSignIn={handleSignIn} withNotifications />
}

export default Navbar
4 changes: 3 additions & 1 deletion src/components/Navbar/Navbar.types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { Dispatch } from '@reduxjs/toolkit'
import { AuthIdentity } from '@dcl/crypto'
import { NavbarProps } from 'decentraland-dapps/dist/containers/Navbar/Navbar.types'
import { OpenModalAction } from 'decentraland-dapps/dist/modules/modal/actions'
import { LoginRequestAction } from '../../modules/identity/action'

export type Props = Partial<NavbarProps> & {
hasActivity: boolean
isConnected: boolean
identity?: AuthIdentity
}

export type MapStateProps = Pick<Props, 'hasActivity' | 'isConnected'>
export type MapStateProps = Pick<Props, 'hasActivity' | 'isConnected' | 'identity'>
export type MapDispatch = Dispatch<OpenModalAction | LoginRequestAction>

0 comments on commit a88a203

Please sign in to comment.