diff --git a/app/containers/StatusBar.tsx b/app/containers/StatusBar.tsx index 5ebaf2307..e54eb46e1 100644 --- a/app/containers/StatusBar.tsx +++ b/app/containers/StatusBar.tsx @@ -2,22 +2,27 @@ import React from 'react'; import { StatusBar as StatusBarRN } from 'react-native'; import { themes } from '../constants/colors'; -import { withTheme } from '../theme'; +import { useTheme } from '../theme'; + +const supportedStyles = { + 'light-content': 'light-content', + 'dark-content': 'dark-content' +}; interface IStatusBar { - theme?: string; - barStyle?: any; + barStyle?: keyof typeof supportedStyles; backgroundColor?: string; } -const StatusBar = React.memo(({ theme, barStyle, backgroundColor }: IStatusBar) => { +const StatusBar = React.memo(({ barStyle, backgroundColor }: IStatusBar) => { + const { theme } = useTheme(); if (!barStyle) { barStyle = 'light-content'; if (theme === 'light') { barStyle = 'dark-content'; } } - return ; + return ; }); -export default withTheme(StatusBar); +export default StatusBar; diff --git a/app/views/E2EEncryptionSecurityView.tsx b/app/views/E2EEncryptionSecurityView.tsx index 347590430..5c7cbac09 100644 --- a/app/views/E2EEncryptionSecurityView.tsx +++ b/app/views/E2EEncryptionSecurityView.tsx @@ -164,7 +164,7 @@ class E2EEncryptionSecurityView extends React.Component - + {this.renderChangePassword()}