From 55742394257859b27d85c21bf5612910bf58a903 Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Wed, 13 Dec 2023 19:26:14 +0100 Subject: [PATCH] Replace themeColors with useTheme --- src/components/BlockingViews/FullPageOfflineBlockingView.js | 6 ++++-- src/components/SAMLLoadingIndicator.js | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/BlockingViews/FullPageOfflineBlockingView.js b/src/components/BlockingViews/FullPageOfflineBlockingView.js index 84872a8aa00a..0cf5e2d20f13 100644 --- a/src/components/BlockingViews/FullPageOfflineBlockingView.js +++ b/src/components/BlockingViews/FullPageOfflineBlockingView.js @@ -5,7 +5,7 @@ import networkPropTypes from '@components/networkPropTypes'; import {withNetwork} from '@components/OnyxProvider'; import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; import compose from '@libs/compose'; -import themeColors from '@styles/themes/default'; +import useTheme from '@styles/themes/useTheme'; import BlockingView from './BlockingView'; const propTypes = { @@ -20,11 +20,13 @@ const propTypes = { }; function FullPageOfflineBlockingView(props) { + const theme = useTheme(); + if (props.network.isOffline) { return ( diff --git a/src/components/SAMLLoadingIndicator.js b/src/components/SAMLLoadingIndicator.js index d6d061122eff..2f70cfe5caf6 100644 --- a/src/components/SAMLLoadingIndicator.js +++ b/src/components/SAMLLoadingIndicator.js @@ -1,7 +1,7 @@ import React from 'react'; import {StyleSheet, View} from 'react-native'; import useLocalize from '@hooks/useLocalize'; -import themeColors from '@styles/themes/default'; +import useTheme from '@styles/themes/useTheme'; import useThemeStyles from '@styles/useThemeStyles'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; @@ -10,6 +10,7 @@ import Text from './Text'; function SAMLLoadingIndicator() { const {translate} = useLocalize(); + const theme = useTheme(); const styles = useThemeStyles(); return ( @@ -30,7 +31,7 @@ function SAMLLoadingIndicator() {