From 24d0223fee38c36ec19d9c662579dba7d787f8b4 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 5 Sep 2019 09:49:25 +0200 Subject: polishing --- src/features/workspaces/containers/WorkspacesScreen.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/features/workspaces/containers/WorkspacesScreen.js') diff --git a/src/features/workspaces/containers/WorkspacesScreen.js b/src/features/workspaces/containers/WorkspacesScreen.js index 2ab565fa1..5fbb0c31d 100644 --- a/src/features/workspaces/containers/WorkspacesScreen.js +++ b/src/features/workspaces/containers/WorkspacesScreen.js @@ -10,29 +10,38 @@ import { getUserWorkspacesRequest, updateWorkspaceRequest, } from '../api'; +import UserStore from '../../../stores/UserStore'; -@inject('actions') @observer +@inject('stores', 'actions') @observer class WorkspacesScreen extends Component { static propTypes = { + stores: PropTypes.shape({ + user: PropTypes.instanceOf(UserStore), + }).isRequired, actions: PropTypes.shape({ workspace: PropTypes.shape({ edit: PropTypes.func.isRequired, }), + ui: PropTypes.shape({ + openSettings: PropTypes.func.isRequired, + }), }).isRequired, }; render() { - const { actions } = this.props; + const { stores, actions } = this.props; return ( actions.workspaces.create(data)} onWorkspaceClick={w => actions.workspaces.edit({ workspace: w })} + onUpgradeAccount={() => actions.ui.openSettings({ path: 'user' })} /> ); -- cgit v1.2.3-70-g09d2 From f0b46fc9655b9e13039f1e4f1b7c0c0def0c0241 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 5 Sep 2019 10:16:43 +0200 Subject: Fix linting issues --- src/components/settings/team/TeamDashboard.js | 2 -- src/components/ui/UpgradeButton/index.js | 1 - .../workspaces/components/WorkspacesDashboard.js | 4 +--- .../workspaces/containers/WorkspacesScreen.js | 11 +--------- .../components/settings/team/TeamDashboard.json | 24 +++++++++++----------- .../src/components/ui/UpgradeButton/index.json | 4 ++-- 6 files changed, 16 insertions(+), 30 deletions(-) (limited to 'src/features/workspaces/containers/WorkspacesScreen.js') diff --git a/src/components/settings/team/TeamDashboard.js b/src/components/settings/team/TeamDashboard.js index 51a3f375d..a9df980d7 100644 --- a/src/components/settings/team/TeamDashboard.js +++ b/src/components/settings/team/TeamDashboard.js @@ -9,9 +9,7 @@ import { Badge } from '@meetfranz/ui'; import Loader from '../../ui/Loader'; import Button from '../../ui/Button'; import Infobox from '../../ui/Infobox'; -import PremiumFeatureContainer from '../../ui/PremiumFeatureContainer'; import globalMessages from '../../../i18n/globalMessages'; -import ActivateTrialButton from '../../ui/ActivateTrialButton'; import UpgradeButton from '../../ui/UpgradeButton'; const messages = defineMessages({ diff --git a/src/components/ui/UpgradeButton/index.js b/src/components/ui/UpgradeButton/index.js index 4aa494e38..73762f0bf 100644 --- a/src/components/ui/UpgradeButton/index.js +++ b/src/components/ui/UpgradeButton/index.js @@ -2,7 +2,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { inject, observer } from 'mobx-react'; import { defineMessages, intlShape } from 'react-intl'; -import classnames from 'classnames'; import { Button } from '@meetfranz/forms'; import { gaEvent } from '../../../lib/analytics'; diff --git a/src/features/workspaces/components/WorkspacesDashboard.js b/src/features/workspaces/components/WorkspacesDashboard.js index fc636dd95..70e213912 100644 --- a/src/features/workspaces/components/WorkspacesDashboard.js +++ b/src/features/workspaces/components/WorkspacesDashboard.js @@ -50,7 +50,7 @@ const messages = defineMessages({ }, }); -const styles = theme => ({ +const styles = () => ({ table: { width: '100%', '& td': { @@ -96,8 +96,6 @@ class WorkspacesDashboard extends Component { onCreateWorkspaceSubmit: PropTypes.func.isRequired, onWorkspaceClick: PropTypes.func.isRequired, workspaces: MobxPropTypes.arrayOrObservableArray.isRequired, - isPersonalUser: PropTypes.bool.isRequired, - onUpgradeAccount: PropTypes.func.isRequired, }; static contextTypes = { diff --git a/src/features/workspaces/containers/WorkspacesScreen.js b/src/features/workspaces/containers/WorkspacesScreen.js index 5fbb0c31d..affbd230d 100644 --- a/src/features/workspaces/containers/WorkspacesScreen.js +++ b/src/features/workspaces/containers/WorkspacesScreen.js @@ -10,38 +10,29 @@ import { getUserWorkspacesRequest, updateWorkspaceRequest, } from '../api'; -import UserStore from '../../../stores/UserStore'; @inject('stores', 'actions') @observer class WorkspacesScreen extends Component { static propTypes = { - stores: PropTypes.shape({ - user: PropTypes.instanceOf(UserStore), - }).isRequired, actions: PropTypes.shape({ workspace: PropTypes.shape({ edit: PropTypes.func.isRequired, }), - ui: PropTypes.shape({ - openSettings: PropTypes.func.isRequired, - }), }).isRequired, }; render() { - const { stores, actions } = this.props; + const { actions } = this.props; return ( actions.workspaces.create(data)} onWorkspaceClick={w => actions.workspaces.edit({ workspace: w })} - onUpgradeAccount={() => actions.ui.openSettings({ path: 'user' })} /> ); diff --git a/src/i18n/messages/src/components/settings/team/TeamDashboard.json b/src/i18n/messages/src/components/settings/team/TeamDashboard.json index 6ef3789c4..01d033044 100644 --- a/src/i18n/messages/src/components/settings/team/TeamDashboard.json +++ b/src/i18n/messages/src/components/settings/team/TeamDashboard.json @@ -4,11 +4,11 @@ "defaultMessage": "!!!Team", "file": "src/components/settings/team/TeamDashboard.js", "start": { - "line": 18, + "line": 16, "column": 12 }, "end": { - "line": 21, + "line": 19, "column": 3 } }, @@ -17,11 +17,11 @@ "defaultMessage": "!!!Franz for Teams", "file": "src/components/settings/team/TeamDashboard.js", "start": { - "line": 22, + "line": 20, "column": 19 }, "end": { - "line": 25, + "line": 23, "column": 3 } }, @@ -30,11 +30,11 @@ "defaultMessage": "!!!You and your team use Franz? You can now manage Premium subscriptions for as many colleagues, friends or family members as you want, all from within one account.", "file": "src/components/settings/team/TeamDashboard.js", "start": { - "line": 26, + "line": 24, "column": 9 }, "end": { - "line": 29, + "line": 27, "column": 3 } }, @@ -43,11 +43,11 @@ "defaultMessage": "!!!Franz for Teams gives you the option to invite co-workers to your team by sending them email invitations and manage their subscriptions in your account’s preferences. Don’t waste time setting up subscriptions for every team member individually, forget about multiple invoices and different billing cycles - one team to rule them all!", "file": "src/components/settings/team/TeamDashboard.js", "start": { - "line": 30, + "line": 28, "column": 8 }, "end": { - "line": 33, + "line": 31, "column": 3 } }, @@ -56,11 +56,11 @@ "defaultMessage": "!!!Manage your Team on meetfranz.com", "file": "src/components/settings/team/TeamDashboard.js", "start": { - "line": 34, + "line": 32, "column": 16 }, "end": { - "line": 37, + "line": 35, "column": 3 } }, @@ -69,11 +69,11 @@ "defaultMessage": "!!!Upgrade your Account", "file": "src/components/settings/team/TeamDashboard.js", "start": { - "line": 38, + "line": 36, "column": 17 }, "end": { - "line": 41, + "line": 39, "column": 3 } } diff --git a/src/i18n/messages/src/components/ui/UpgradeButton/index.json b/src/i18n/messages/src/components/ui/UpgradeButton/index.json index 87e0bc913..28e44cb66 100644 --- a/src/i18n/messages/src/components/ui/UpgradeButton/index.json +++ b/src/i18n/messages/src/components/ui/UpgradeButton/index.json @@ -4,11 +4,11 @@ "defaultMessage": "!!!Upgrade to Franz Professional", "file": "src/components/ui/UpgradeButton/index.js", "start": { - "line": 14, + "line": 13, "column": 16 }, "end": { - "line": 17, + "line": 16, "column": 3 } } -- cgit v1.2.3-70-g09d2