2021-11-11 14:32:56 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React, { PureComponent } from 'react';
|
|
|
|
|
2022-01-25 12:55:57 +00:00
|
|
|
import JitsiScreenWebView from '../../../base/modal/components/JitsiScreenWebView';
|
|
|
|
import JitsiStatusBar from '../../../base/modal/components/JitsiStatusBar';
|
|
|
|
import { connect } from '../../../base/redux';
|
|
|
|
import { renderArrowBackButton }
|
|
|
|
from '../../../mobile/navigation/components/welcome/functions';
|
|
|
|
import { screen } from '../../../mobile/navigation/routes';
|
|
|
|
import styles from '../styles';
|
2021-11-11 14:32:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
const DEFAULT_HELP_CENTRE_URL = 'https://web-cdn.jitsi.net/faq/meet-faq.html';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The URL to display in the Help Centre.
|
|
|
|
*/
|
|
|
|
_url: string,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default prop for navigating between screen components(React Navigation).
|
|
|
|
*/
|
|
|
|
navigation: Object
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements a page that renders the help content for the app.
|
|
|
|
*/
|
|
|
|
class HelpView extends PureComponent<Props> {
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#componentDidMount()}. Invoked
|
|
|
|
* immediately after mounting occurs.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
componentDidMount() {
|
|
|
|
const {
|
|
|
|
navigation
|
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
navigation.setOptions({
|
|
|
|
headerLeft: () =>
|
|
|
|
renderArrowBackButton(() =>
|
2022-06-09 14:23:56 +00:00
|
|
|
navigation.navigate(screen.welcome.main))
|
2021-11-11 14:32:56 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements {@code PureComponent#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<JitsiStatusBar />
|
|
|
|
<JitsiScreenWebView
|
|
|
|
source = { this.props._url }
|
2022-01-25 12:55:57 +00:00
|
|
|
style = { styles.screenContainer } />
|
2021-11-11 14:32:56 +00:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Maps part of the Redux state to the props of this component.
|
|
|
|
*
|
|
|
|
* @param {Object} state - The Redux state.
|
|
|
|
* @returns {Props}
|
|
|
|
*/
|
|
|
|
function _mapStateToProps(state) {
|
|
|
|
return {
|
|
|
|
_url: state['features/base/config'].helpCentreURL || DEFAULT_HELP_CENTRE_URL
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(_mapStateToProps)(HelpView);
|