Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add notifications to marketplace #2069

Merged
merged 7 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the || undefined needed? it returns null?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep it's weird but I need to replace the null with undefined because a downstream component expects AuthIdentity | 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
Loading