Skip to content

Commit

Permalink
Replace themeColors with useTheme
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekBoman committed Dec 13, 2023
1 parent f8448ca commit 5574239
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/components/BlockingViews/FullPageOfflineBlockingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -20,11 +20,13 @@ const propTypes = {
};

function FullPageOfflineBlockingView(props) {
const theme = useTheme();

if (props.network.isOffline) {
return (
<BlockingView
icon={Expensicons.OfflineCloud}
iconColor={themeColors.offline}
iconColor={theme.offline}
title={props.translate('common.youAppearToBeOffline')}
subtitle={props.translate('common.thisFeatureRequiresInternet')}
/>
Expand Down
5 changes: 3 additions & 2 deletions src/components/SAMLLoadingIndicator.js
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -10,6 +10,7 @@ import Text from './Text';

function SAMLLoadingIndicator() {
const {translate} = useLocalize();
const theme = useTheme();
const styles = useThemeStyles();
return (
<View style={[StyleSheet.absoluteFillObject, styles.deeplinkWrapperContainer]}>
Expand All @@ -30,7 +31,7 @@ function SAMLLoadingIndicator() {
<Icon
width={154}
height={34}
fill={themeColors.success}
fill={theme.success}
src={Expensicons.ExpensifyWordmark}
/>
</View>
Expand Down

0 comments on commit 5574239

Please sign in to comment.