diff --git a/src/Expensify.js b/src/Expensify.js index 431db2e8d9a1..eca2fb130a37 100644 --- a/src/Expensify.js +++ b/src/Expensify.js @@ -1,10 +1,11 @@ import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; import React, {PureComponent} from 'react'; -import {View, StatusBar, AppState} from 'react-native'; +import {View, AppState} from 'react-native'; import Onyx, {withOnyx} from 'react-native-onyx'; import BootSplash from './libs/BootSplash'; +import StatusBar from './libs/StatusBar'; import listenToStorageEvents from './libs/listenToStorageEvents'; import * as ActiveClientManager from './libs/ActiveClientManager'; import ONYXKEYS from './ONYXKEYS'; diff --git a/src/components/Button.js b/src/components/Button.js index a5854151e748..c170e64eb3a1 100644 --- a/src/components/Button.js +++ b/src/components/Button.js @@ -10,7 +10,7 @@ import OpacityView from './OpacityView'; const propTypes = { /** The text for the button label */ - text: PropTypes.string.isRequired, + text: PropTypes.string, /** Indicates whether the button should be disabled and in the loading state */ isLoading: PropTypes.bool, @@ -44,6 +44,7 @@ const propTypes = { }; const defaultProps = { + text: '', isLoading: false, isDisabled: false, onPress: () => {}, diff --git a/src/libs/StatusBar/index.android.js b/src/libs/StatusBar/index.android.js new file mode 100644 index 000000000000..0ea4480dc928 --- /dev/null +++ b/src/libs/StatusBar/index.android.js @@ -0,0 +1,4 @@ +import {StatusBar} from 'react-native'; + +// Just export StatusBar – no changes. +export default StatusBar; diff --git a/src/libs/StatusBar/index.js b/src/libs/StatusBar/index.js new file mode 100644 index 000000000000..4aea200cab00 --- /dev/null +++ b/src/libs/StatusBar/index.js @@ -0,0 +1,6 @@ +import {StatusBar} from 'react-native'; + +// Overwrite setTranslucent to suppress a warning on iOS +StatusBar.setTranslucent = () => {}; + +export default StatusBar; diff --git a/src/pages/settings/AboutPage.js b/src/pages/settings/AboutPage.js index c273ae70ca27..f337c2bae552 100644 --- a/src/pages/settings/AboutPage.js +++ b/src/pages/settings/AboutPage.js @@ -108,7 +108,7 @@ const AboutPage = ({translate, session}) => { {menuItems.map(item => ( { }; AboutPage.propTypes = propTypes; -AboutPage.displayName = 'PreferencesPage'; +AboutPage.displayName = 'AboutPage'; export default compose( withLocalize, diff --git a/src/pages/settings/AppDownloadLinks.js b/src/pages/settings/AppDownloadLinks.js index 4d0543b2718b..faa7b0d0b3ea 100644 --- a/src/pages/settings/AppDownloadLinks.js +++ b/src/pages/settings/AppDownloadLinks.js @@ -49,7 +49,7 @@ const AppDownloadLinksPage = ({translate}) => { {menuItems.map(item => ( { }; AppDownloadLinksPage.propTypes = propTypes; -AppDownloadLinksPage.displayName = 'PreferencesPage'; +AppDownloadLinksPage.displayName = 'AppDownloadLinksPage'; export default compose( withLocalize, diff --git a/src/pages/settings/InitialPage.js b/src/pages/settings/InitialPage.js index 15eb4e485beb..3bc32dcf846a 100755 --- a/src/pages/settings/InitialPage.js +++ b/src/pages/settings/InitialPage.js @@ -135,10 +135,10 @@ const InitialSettingsPage = ({ {menuItems.map(item => ( item.action()} + onPress={item.action} shouldShowRightIcon /> ))} diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js index abd03e9cb62c..2cce3b772dbb 100755 --- a/src/pages/settings/Profile/ProfilePage.js +++ b/src/pages/settings/Profile/ProfilePage.js @@ -384,7 +384,7 @@ class ProfilePage extends Component {