aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers
diff options
context:
space:
mode:
authorLibravatar Ricardo Cino <ricardo@cino.io>2022-06-27 20:35:53 +0200
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-06-28 04:34:34 +0530
commit81fc26b770915124b86b35b21cf664e1240718e2 (patch)
treee3c4ac37768b32d3f522041e091d8b50309e0024 /src/containers
parentchore: turn error boundary into typescript (diff)
downloadferdium-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')
-rw-r--r--src/containers/settings/SupportScreen.js35
-rw-r--r--src/containers/settings/SupportScreen.tsx16
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 @@
1import { Component } from 'react';
2import { inject } from 'mobx-react';
3import PropTypes from 'prop-types';
4
5import SupportFerdium from '../../components/settings/supportFerdium/SupportFerdiumDashboard';
6import ErrorBoundary from '../../components/util/ErrorBoundary';
7import AppStore from '../../stores/AppStore';
8
9class 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
29SupportScreen.propTypes = {
30 actions: PropTypes.shape({
31 app: PropTypes.instanceOf(AppStore).isRequired,
32 }).isRequired,
33};
34
35export 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 @@
1import { Component, ReactElement } from 'react';
2
3import SupportFerdium from '../../components/settings/supportFerdium/SupportFerdiumDashboard';
4import ErrorBoundary from '../../components/util/ErrorBoundary';
5
6class SupportScreen extends Component {
7 render(): ReactElement {
8 return (
9 <ErrorBoundary>
10 <SupportFerdium />
11 </ErrorBoundary>
12 );
13 }
14}
15
16export default SupportScreen;