From 537697a6e9757f118d09d9e76362ba1ff617e2c6 Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Mon, 13 Sep 2021 14:45:46 +0200 Subject: chore: upgrade intl dependencies (#1920) --- src/components/settings/team/TeamDashboard.js | 54 +++++++++++++++------------ 1 file changed, 30 insertions(+), 24 deletions(-) (limited to 'src/components/settings/team') diff --git a/src/components/settings/team/TeamDashboard.js b/src/components/settings/team/TeamDashboard.js index 437225058..176365fa8 100644 --- a/src/components/settings/team/TeamDashboard.js +++ b/src/components/settings/team/TeamDashboard.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { observer } from 'mobx-react'; -import { defineMessages, intlShape } from 'react-intl'; +import { defineMessages, injectIntl } from 'react-intl'; import ReactTooltip from 'react-tooltip'; import injectSheet from 'react-jss'; import classnames from 'classnames'; @@ -14,31 +14,34 @@ import { LIVE_FRANZ_API } from '../../../config'; const messages = defineMessages({ headline: { id: 'settings.team.headline', - defaultMessage: '!!!Team', + defaultMessage: 'Team', }, contentHeadline: { id: 'settings.team.contentHeadline', - defaultMessage: '!!!Franz Team Management', + defaultMessage: 'Franz Team Management', }, intro: { id: 'settings.team.intro', - defaultMessage: '!!!Your are currently using Franz Servers, which is why you have access to Team Management.', + defaultMessage: + 'Your are currently using Franz Servers, which is why you have access to Team Management.', }, copy: { id: 'settings.team.copy', - defaultMessage: '!!!Franz\'s Team Management allows you to manage Franz Subscriptions for multiple users. Please keep in mind that having a Franz Premium subscription will give you no advantages in using Ferdi: The only reason you still have access to Team Management is so you can manage your legacy Franz Teams and so that you don\'t loose any functionality in managing your account.', + defaultMessage: + "Franz's Team Management allows you to manage Franz Subscriptions for multiple users. Please keep in mind that having a Franz Premium subscription will give you no advantages in using Ferdi: The only reason you still have access to Team Management is so you can manage your legacy Franz Teams and so that you don't loose any functionality in managing your account.", }, manageButton: { id: 'settings.team.manageAction', - defaultMessage: '!!!Manage your Team on meetfranz.com', + defaultMessage: 'Manage your Team on meetfranz.com', }, teamsUnavailable: { id: 'settings.team.teamsUnavailable', - defaultMessage: '!!!Teams are unavailable', + defaultMessage: 'Teams are unavailable', }, teamsUnavailableInfo: { id: 'settings.team.teamsUnavailableInfo', - defaultMessage: '!!!Teams are currently only available when using the Franz Server and after paying for Franz Professional. Please change your server to https://api.franzinfra.com to use teams.', + defaultMessage: + 'Teams are currently only available when using the Franz Server and after paying for Franz Professional. Please change your server to https://api.franzinfra.com to use teams.', }, }); @@ -87,7 +90,9 @@ const styles = { }, }; -export default @injectSheet(styles) @observer class TeamDashboard extends Component { +@injectSheet(styles) +@observer +class TeamDashboard extends Component { static propTypes = { isLoading: PropTypes.bool.isRequired, userInfoRequestFailed: PropTypes.bool.isRequired, @@ -97,10 +102,6 @@ export default @injectSheet(styles) @observer class TeamDashboard extends Compon server: PropTypes.string.isRequired, }; - static contextTypes = { - intl: intlShape, - }; - render() { const { isLoading, @@ -110,7 +111,7 @@ export default @injectSheet(styles) @observer class TeamDashboard extends Compon classes, server, } = this.props; - const { intl } = this.context; + const { intl } = this.props; if (server === LIVE_FRANZ_API) { return ( @@ -121,9 +122,7 @@ export default @injectSheet(styles) @observer class TeamDashboard extends Compon
- {isLoading && ( - - )} + {isLoading && } {!isLoading && userInfoRequestFailed && ( <> -

{intl.formatMessage(messages.contentHeadline)} -

{intl.formatMessage(messages.intro)}

{intl.formatMessage(messages.copy)}

- Ferdi for Teams + Ferdi for Teams