aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings/SupportScreen.js
blob: 34dce1dae6804f83bc4755c71817971d5316c79e (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
36
import React, { Component } from 'react';
import { inject } from 'mobx-react';
import PropTypes from 'prop-types';

import SupportFerdi from '../../components/settings/supportFerdi/SupportFerdiDashboard';
import ErrorBoundary from '../../components/util/ErrorBoundary';

export default @inject('actions') 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>
        <SupportFerdi
          openLink={this.openLink}
        />
      </ErrorBoundary>
    );
  }
}

SupportScreen.wrappedComponent.propTypes = {
  actions: PropTypes.shape({
    app: PropTypes.shape({
      openExternalUrl: PropTypes.func.isRequired,
    }).isRequired,
  }).isRequired,
};