diff options
author | 2022-06-27 18:21:31 +0200 | |
---|---|---|
committer | 2022-06-27 17:21:31 +0100 | |
commit | 0bf13689d53bd493fb4d0a4213c1801013b5aa8a (patch) | |
tree | 2b5ae44e4f1aa73b49c011954ff1cb47e3959bad /src/containers/settings/TeamScreen.js | |
parent | chore: recommend specific vscode extensions to setup development [skip ci] (#... (diff) | |
download | ferdium-app-0bf13689d53bd493fb4d0a4213c1801013b5aa8a.tar.gz ferdium-app-0bf13689d53bd493fb4d0a4213c1801013b5aa8a.tar.zst ferdium-app-0bf13689d53bd493fb4d0a4213c1801013b5aa8a.zip |
chore: transform containers/settings from js to tsx (#384)
Diffstat (limited to 'src/containers/settings/TeamScreen.js')
-rw-r--r-- | src/containers/settings/TeamScreen.js | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/containers/settings/TeamScreen.js b/src/containers/settings/TeamScreen.js deleted file mode 100644 index 0a8b92b47..000000000 --- a/src/containers/settings/TeamScreen.js +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { inject, observer } from 'mobx-react'; | ||
4 | |||
5 | import UserStore from '../../stores/UserStore'; | ||
6 | import AppStore from '../../stores/AppStore'; | ||
7 | import SettingsStore from '../../stores/SettingsStore'; | ||
8 | |||
9 | import TeamDashboard from '../../components/settings/team/TeamDashboard'; | ||
10 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | ||
11 | import { DEV_API_FRANZ_WEBSITE } from '../../config'; | ||
12 | |||
13 | class TeamScreen extends Component { | ||
14 | handleWebsiteLink(route) { | ||
15 | const { actions, stores } = this.props; | ||
16 | |||
17 | const url = `${DEV_API_FRANZ_WEBSITE}/${route}?authToken=${stores.user.authToken}&utm_source=app&utm_medium=account_dashboard`; | ||
18 | |||
19 | actions.app.openExternalUrl({ url }); | ||
20 | } | ||
21 | |||
22 | render() { | ||
23 | const { user, settings } = this.props.stores; | ||
24 | |||
25 | const isLoadingUserInfo = user.getUserInfoRequest.isExecuting; | ||
26 | const { server } = settings.app; | ||
27 | |||
28 | return ( | ||
29 | <ErrorBoundary> | ||
30 | <TeamDashboard | ||
31 | isLoading={isLoadingUserInfo} | ||
32 | userInfoRequestFailed={ | ||
33 | user.getUserInfoRequest.wasExecuted && | ||
34 | user.getUserInfoRequest.isError | ||
35 | } | ||
36 | retryUserInfoRequest={() => this.reloadData()} | ||
37 | openTeamManagement={() => this.handleWebsiteLink('/user/team')} | ||
38 | server={server} | ||
39 | /> | ||
40 | </ErrorBoundary> | ||
41 | ); | ||
42 | } | ||
43 | } | ||
44 | |||
45 | TeamScreen.propTypes = { | ||
46 | stores: PropTypes.shape({ | ||
47 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
48 | app: PropTypes.instanceOf(AppStore).isRequired, | ||
49 | settings: PropTypes.instanceOf(SettingsStore).isRequired, | ||
50 | }).isRequired, | ||
51 | actions: PropTypes.shape({ | ||
52 | app: PropTypes.instanceOf(AppStore).isRequired, | ||
53 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
54 | }).isRequired, | ||
55 | }; | ||
56 | |||
57 | export default inject('stores', 'actions')(observer(TeamScreen)); | ||