diff options
author | 2022-06-27 20:35:53 +0200 | |
---|---|---|
committer | 2022-06-28 04:34:34 +0530 | |
commit | 81fc26b770915124b86b35b21cf664e1240718e2 (patch) | |
tree | e3c4ac37768b32d3f522041e091d8b50309e0024 /src/containers/settings | |
parent | chore: turn error boundary into typescript (diff) | |
download | ferdium-app-81fc26b770915124b86b35b21cf664e1240718e2.tar.gz ferdium-app-81fc26b770915124b86b35b21cf664e1240718e2.tar.zst ferdium-app-81fc26b770915124b86b35b21cf664e1240718e2.zip |
chore: turn last setting view into typescript
Diffstat (limited to 'src/containers/settings')
-rw-r--r-- | src/containers/settings/SupportScreen.js | 35 | ||||
-rw-r--r-- | src/containers/settings/SupportScreen.tsx | 16 |
2 files changed, 16 insertions, 35 deletions
diff --git a/src/containers/settings/SupportScreen.js b/src/containers/settings/SupportScreen.js deleted file mode 100644 index 142bd3a57..000000000 --- a/src/containers/settings/SupportScreen.js +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { inject } from 'mobx-react'; | ||
3 | import PropTypes from 'prop-types'; | ||
4 | |||
5 | import SupportFerdium from '../../components/settings/supportFerdium/SupportFerdiumDashboard'; | ||
6 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | ||
7 | import AppStore from '../../stores/AppStore'; | ||
8 | |||
9 | class SupportScreen extends Component { | ||
10 | constructor(props) { | ||
11 | super(props); | ||
12 | |||
13 | this.openLink = this.openLink.bind(this); | ||
14 | } | ||
15 | |||
16 | openLink(url) { | ||
17 | this.props.actions.app.openExternalUrl({ url }); | ||
18 | } | ||
19 | |||
20 | render() { | ||
21 | return ( | ||
22 | <ErrorBoundary> | ||
23 | <SupportFerdium openLink={this.openLink} /> | ||
24 | </ErrorBoundary> | ||
25 | ); | ||
26 | } | ||
27 | } | ||
28 | |||
29 | SupportScreen.propTypes = { | ||
30 | actions: PropTypes.shape({ | ||
31 | app: PropTypes.instanceOf(AppStore).isRequired, | ||
32 | }).isRequired, | ||
33 | }; | ||
34 | |||
35 | export default inject('actions')(SupportScreen); | ||
diff --git a/src/containers/settings/SupportScreen.tsx b/src/containers/settings/SupportScreen.tsx new file mode 100644 index 000000000..c2f25ad8c --- /dev/null +++ b/src/containers/settings/SupportScreen.tsx | |||
@@ -0,0 +1,16 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | |||
3 | import SupportFerdium from '../../components/settings/supportFerdium/SupportFerdiumDashboard'; | ||
4 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | ||
5 | |||
6 | class SupportScreen extends Component { | ||
7 | render(): ReactElement { | ||
8 | return ( | ||
9 | <ErrorBoundary> | ||
10 | <SupportFerdium /> | ||
11 | </ErrorBoundary> | ||
12 | ); | ||
13 | } | ||
14 | } | ||
15 | |||
16 | export default SupportScreen; | ||