aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings/SupportScreen.js
blob: 142bd3a57c50f80ff83495d2e05312b8a1796a91 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { Component } from 'react';
import { inject } from 'mobx-react';
import PropTypes from 'prop-types';

import SupportFerdium from '../../components/settings/supportFerdium/SupportFerdiumDashboard';
import ErrorBoundary from '../../components/util/ErrorBoundary';
import AppStore from '../../stores/AppStore';

class SupportScreen extends Component {
  constructor(props) {
    super(props);

    this.openLink = this.openLink.bind(this);
  }

  openLink(url) {
    this.props.actions.app.openExternalUrl({ url });
  }

  render() {
    return (
      <ErrorBoundary>
        <SupportFerdium openLink={this.openLink} />
      </ErrorBoundary>
    );
  }
}

SupportScreen.propTypes = {
  actions: PropTypes.shape({
    app: PropTypes.instanceOf(AppStore).isRequired,
  }).isRequired,
};

export default inject('actions')(SupportScreen);