diff --git a/src/components/UserMenu/UserMenu.i18n.ts b/src/components/UserMenu/UserMenu.i18n.ts index fcff89ef..772ac3bd 100644 --- a/src/components/UserMenu/UserMenu.i18n.ts +++ b/src/components/UserMenu/UserMenu.i18n.ts @@ -1,16 +1,15 @@ import { UserMenuI18N } from './UserMenu.types' export const i18n = { + account: 'Account Settings', activity: 'Activity', + guest: 'Guest', + jumpIn: 'Jump In', + marketplaceAuthorizations: 'Marketplace Authorizations', myAssets: 'My Assets', - settings: 'Account Settings', myLists: 'My Lists', - account: 'Account', profile: 'Profile', - viewProfile: 'View Profile', signIn: 'Sign In', signOut: 'Log Out', - guest: 'Guest', - wallet: 'Manage Wallet', - jumpIn: 'Jump In' + viewProfile: 'View Profile' } as UserMenuI18N diff --git a/src/components/UserMenu/UserMenu.stories.tsx b/src/components/UserMenu/UserMenu.stories.tsx index 688926b6..4097f18d 100644 --- a/src/components/UserMenu/UserMenu.stories.tsx +++ b/src/components/UserMenu/UserMenu.stories.tsx @@ -87,7 +87,7 @@ storiesOf('UserMenu', module) i18n={i18n} isSignedIn avatar={avatar} - onClickAccountSettings={() => undefined} + onClickMarketplaceAuthorization={() => undefined} onClickActivity={() => undefined} manaBalances={{ [Network.ETHEREUM]: 1000, [Network.MATIC]: 2500 }} hasActivity @@ -100,7 +100,7 @@ storiesOf('UserMenu', module) i18n={i18n} isSignedIn avatar={avatar} - onClickAccountSettings={() => undefined} + onClickMarketplaceAuthorization={() => undefined} onClickActivity={() => undefined} manaBalances={{ [Network.ETHEREUM]: 1000, [Network.MATIC]: 2500 }} hasActivity @@ -125,7 +125,7 @@ storiesOf('UserMenu', module) i18n={i18n} isSignedIn avatar={avatar} - onClickAccountSettings={() => undefined} + onClickMarketplaceAuthorization={() => undefined} onClickActivity={() => undefined} manaBalances={{ [Network.ETHEREUM]: 1000, [Network.MATIC]: 2500 }} hasActivity diff --git a/src/components/UserMenu/UserMenu.types.ts b/src/components/UserMenu/UserMenu.types.ts index 8514e413..a888cd68 100644 --- a/src/components/UserMenu/UserMenu.types.ts +++ b/src/components/UserMenu/UserMenu.types.ts @@ -20,26 +20,25 @@ export type UserMenuProps = Omit< export type UserMenuI18N = Record< | 'myAssets' - | 'settings' | 'account' | 'viewProfile' | 'signIn' | 'signOut' | 'guest' - | 'wallet' + | 'marketplaceAuthorizations' | 'jumpIn', string > export enum UserMenuEventId { ACTIVITY = 'activity', + ACCOUNT = 'account', MY_ASSETS = 'my_assets', - SETTINGS = 'settings', PROFILE = 'profile', SIGN_IN = 'sign_in', SIGN_OUT = 'sign_out', GUEST = 'guest', - WALLET = 'wallet', + MARKETPLACE_AUTHORIZATIONS = 'marketplace_authorizations', JUMP_IN = 'jump_in', BALANCE = 'balance' } diff --git a/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.stories.tsx b/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.stories.tsx index ad054cbf..973305c8 100644 --- a/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.stories.tsx +++ b/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.stories.tsx @@ -19,13 +19,13 @@ storiesOf('UserMenuSignedIn', module) avatar={{ ...avatar, hasClaimedName: false }} trackingId="" isOpen - onClickAccountSettings={console.log} + onClickMarketplaceAuthorization={console.log} onClickActivity={console.log} onClickMyAssets={console.log} onClickProfile={console.log} onClickSignOut={console.log} onClickToggle={console.log} - onClickWallet={console.log} + onClickAccount={console.log} i18n={i18n} /> @@ -36,13 +36,13 @@ storiesOf('UserMenuSignedIn', module) trackingId="" address={avatar.ethAddress} isOpen - onClickAccountSettings={console.log} + onClickMarketplaceAuthorization={console.log} onClickActivity={console.log} onClickMyAssets={console.log} onClickProfile={console.log} onClickSignOut={console.log} onClickToggle={console.log} - onClickWallet={console.log} + onClickAccount={console.log} i18n={i18n} /> @@ -54,13 +54,13 @@ storiesOf('UserMenuSignedIn', module) manaBalances={{ [Network.ETHEREUM]: 1000, [Network.MATIC]: 2500 }} trackingId="" isOpen - onClickAccountSettings={console.log} + onClickMarketplaceAuthorization={console.log} onClickActivity={console.log} onClickMyAssets={console.log} onClickProfile={console.log} onClickSignOut={console.log} onClickToggle={console.log} - onClickWallet={console.log} + onClickAccount={console.log} i18n={i18n} /> @@ -105,13 +105,13 @@ storiesOf('UserMenuSignedIn', module) onClick: console.log, onClose: console.log }} - onClickAccountSettings={console.log} + onClickMarketplaceAuthorization={console.log} onClickActivity={console.log} onClickMyAssets={console.log} onClickProfile={console.log} onClickSignOut={console.log} onClickToggle={console.log} - onClickWallet={console.log} + onClickAccount={console.log} i18n={i18n} /> diff --git a/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.tsx b/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.tsx index 2bdca083..c248d795 100644 --- a/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.tsx +++ b/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.tsx @@ -26,7 +26,7 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => { trackingId, notifications, i18n, - onClickAccountSettings, + onClickMarketplaceAuthorization, onClickActivity, onClickBalance, onClickClose, @@ -35,7 +35,7 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => { onClickProfile, onClickSignOut, onClickToggle, - onClickWallet + onClickAccount } = props const isTabletAndBelow = useTabletAndBelowMediaQuery() @@ -89,18 +89,18 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => { [onClickMyAssets, onClickUserMenuItem, trackingId] ) - const handleClickAccountSettings = useCallback( + const handleClickMarketplaceAuthorization = useCallback( (event: React.MouseEvent) => { onClickUserMenuItem && onClickUserMenuItem(event, { - eventTrackingName: UserMenuEventId.SETTINGS, + eventTrackingName: UserMenuEventId.MARKETPLACE_AUTHORIZATIONS, trackingId, url: config.get('MARKETPLACE_SETTINGS_URL') }) setTimeout( () => { - onClickAccountSettings - ? onClickAccountSettings(event) + onClickMarketplaceAuthorization + ? onClickMarketplaceAuthorization(event) : window.open( `${config.get('MARKETPLACE_SETTINGS_URL')}`, '_blank', @@ -110,7 +110,7 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => { onClickUserMenuItem ? 300 : 0 ) }, - [onClickAccountSettings, onClickUserMenuItem, trackingId] + [onClickMarketplaceAuthorization, onClickUserMenuItem, trackingId] ) const handleClickProfile = useCallback( @@ -134,25 +134,25 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => { [onClickProfile, onClickUserMenuItem, trackingId] ) - const handleClickWallet = useCallback( + const handleClickAccount = useCallback( (event: React.MouseEvent) => { onClickUserMenuItem && onClickUserMenuItem(event, { - eventTrackingName: UserMenuEventId.WALLET, + eventTrackingName: UserMenuEventId.ACCOUNT, trackingId, url: config.get('ACCOUNT_URL') }) setTimeout( () => { - onClickWallet - ? onClickWallet(event) + onClickAccount + ? onClickAccount(event) : window.open(config.get('ACCOUNT_URL'), '_blank', 'noopener') }, onClickUserMenuItem ? 300 : 0 ) }, - [onClickWallet, onClickUserMenuItem, trackingId] + [onClickAccount, onClickUserMenuItem, trackingId] ) const handleClickSignOut = useCallback( @@ -238,14 +238,14 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => {
  • -
    - {i18n.wallet} +
    + {i18n.account}
  • -
    - {i18n.settings} +
    + {i18n.marketplaceAuthorizations}
  • diff --git a/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.types.ts b/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.types.ts index 244604c3..3df2eb1f 100644 --- a/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.types.ts +++ b/src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.types.ts @@ -11,7 +11,7 @@ export type UserMenuSignedInProps = ManaBalancesProps & { hasActivity?: boolean notifications?: NotificationsProps i18n: UserMenuI18N - onClickAccountSettings?: ( + onClickMarketplaceAuthorization?: ( event: React.MouseEvent ) => void onClickActivity?: (event: React.MouseEvent) => void @@ -23,7 +23,7 @@ export type UserMenuSignedInProps = ManaBalancesProps & { trackingId: string ) => void onClickToggle?: (event: React.MouseEvent) => void - onClickWallet?: (event: React.MouseEvent) => void + onClickAccount?: (event: React.MouseEvent) => void onClickUserMenuItem?: ( event: React.MouseEvent, options: { eventTrackingName: string; url?: string; trackingId?: string }