您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

HelpView.js 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // @flow
  2. import React, { PureComponent } from 'react';
  3. import WebView from 'react-native-webview';
  4. import { JitsiModal } from '../../base/modal';
  5. import { connect } from '../../base/redux';
  6. import { HELP_VIEW_MODAL_ID } from '../constants';
  7. const DEFAULT_HELP_CENTRE_URL = 'https://web-cdn.jitsi.net/faq/meet-faq.html';
  8. type Props = {
  9. /**
  10. * The URL to display in the Help Centre.
  11. */
  12. _url: string
  13. }
  14. /**
  15. * Implements a page that renders the help content for the app.
  16. */
  17. class HelpView extends PureComponent<Props> {
  18. /**
  19. * Implements {@code PureComponent#render()}.
  20. *
  21. * @inheritdoc
  22. * @returns {ReactElement}
  23. */
  24. render() {
  25. return (
  26. <JitsiModal
  27. headerLabelKey = 'helpView.header'
  28. modalId = { HELP_VIEW_MODAL_ID }>
  29. <WebView source = {{ uri: this.props._url }} />
  30. </JitsiModal>
  31. );
  32. }
  33. }
  34. /**
  35. * Maps part of the Redux state to the props of this component.
  36. *
  37. * @param {Object} state - The Redux state.
  38. * @returns {Props}
  39. */
  40. function _mapStateToProps(state) {
  41. return {
  42. _url: state['features/base/config'].helpCentreURL || DEFAULT_HELP_CENTRE_URL
  43. };
  44. }
  45. export default connect(_mapStateToProps)(HelpView);