diff options
Diffstat (limited to 'src/components/settings/navigation')
-rw-r--r-- | src/components/settings/navigation/SettingsNavigation.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js index 993b0a44a..df4b3b3b2 100644 --- a/src/components/settings/navigation/SettingsNavigation.js +++ b/src/components/settings/navigation/SettingsNavigation.js | |||
@@ -7,6 +7,7 @@ import { ProBadge } from '@meetfranz/ui'; | |||
7 | import Link from '../../ui/Link'; | 7 | import Link from '../../ui/Link'; |
8 | import { workspaceStore } from '../../../features/workspaces'; | 8 | import { workspaceStore } from '../../../features/workspaces'; |
9 | import UIStore from '../../../stores/UIStore'; | 9 | import UIStore from '../../../stores/UIStore'; |
10 | import UserStore from '../../../stores/UserStore'; | ||
10 | 11 | ||
11 | const messages = defineMessages({ | 12 | const messages = defineMessages({ |
12 | availableServices: { | 13 | availableServices: { |
@@ -25,6 +26,10 @@ const messages = defineMessages({ | |||
25 | id: 'settings.navigation.account', | 26 | id: 'settings.navigation.account', |
26 | defaultMessage: '!!!Account', | 27 | defaultMessage: '!!!Account', |
27 | }, | 28 | }, |
29 | team: { | ||
30 | id: 'settings.navigation.team', | ||
31 | defaultMessage: '!!!Manage Team', | ||
32 | }, | ||
28 | settings: { | 33 | settings: { |
29 | id: 'settings.navigation.settings', | 34 | id: 'settings.navigation.settings', |
30 | defaultMessage: '!!!Settings', | 35 | defaultMessage: '!!!Settings', |
@@ -43,6 +48,7 @@ export default @inject('stores') @observer class SettingsNavigation extends Comp | |||
43 | static propTypes = { | 48 | static propTypes = { |
44 | stores: PropTypes.shape({ | 49 | stores: PropTypes.shape({ |
45 | ui: PropTypes.instanceOf(UIStore).isRequired, | 50 | ui: PropTypes.instanceOf(UIStore).isRequired, |
51 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
46 | }).isRequired, | 52 | }).isRequired, |
47 | serviceCount: PropTypes.number.isRequired, | 53 | serviceCount: PropTypes.number.isRequired, |
48 | workspaceCount: PropTypes.number.isRequired, | 54 | workspaceCount: PropTypes.number.isRequired, |
@@ -55,6 +61,7 @@ export default @inject('stores') @observer class SettingsNavigation extends Comp | |||
55 | render() { | 61 | render() { |
56 | const { serviceCount, workspaceCount, stores } = this.props; | 62 | const { serviceCount, workspaceCount, stores } = this.props; |
57 | const { isDarkThemeActive } = stores.ui; | 63 | const { isDarkThemeActive } = stores.ui; |
64 | const { router, user } = stores; | ||
58 | const { intl } = this.context; | 65 | const { intl } = this.context; |
59 | 66 | ||
60 | return ( | 67 | return ( |
@@ -98,6 +105,16 @@ export default @inject('stores') @observer class SettingsNavigation extends Comp | |||
98 | {intl.formatMessage(messages.account)} | 105 | {intl.formatMessage(messages.account)} |
99 | </Link> | 106 | </Link> |
100 | <Link | 107 | <Link |
108 | to="/settings/team" | ||
109 | className="settings-navigation__link" | ||
110 | activeClassName="is-active" | ||
111 | > | ||
112 | {intl.formatMessage(messages.team)} | ||
113 | {!user.data.isPremium && ( | ||
114 | <ProBadge inverted={!isDarkThemeActive && router.location.pathname === '/settings/team'} /> | ||
115 | )} | ||
116 | </Link> | ||
117 | <Link | ||
101 | to="/settings/app" | 118 | to="/settings/app" |
102 | className="settings-navigation__link" | 119 | className="settings-navigation__link" |
103 | activeClassName="is-active" | 120 | activeClassName="is-active" |