refactor: use colors straightly without finding them with theme

This commit is contained in:
Sathurshan 2024-01-25 16:37:40 +05:30
parent db2f14aff7
commit 3f46b2ca84
1 changed files with 2 additions and 3 deletions

View File

@ -3,11 +3,10 @@ import { View } from 'react-native';
import { CustomIcon } from '../../../CustomIcon'; import { CustomIcon } from '../../../CustomIcon';
import { useTheme } from '../../../../theme'; import { useTheme } from '../../../../theme';
import { themes } from '../../../../lib/constants';
import styles from '../../styles'; import styles from '../../styles';
const Translated = memo(({ isTranslated }: { isTranslated: boolean }) => { const Translated = memo(({ isTranslated }: { isTranslated: boolean }) => {
const { theme } = useTheme(); const { colors } = useTheme();
if (!isTranslated) { if (!isTranslated) {
return null; return null;
@ -15,7 +14,7 @@ const Translated = memo(({ isTranslated }: { isTranslated: boolean }) => {
return ( return (
<View style={styles.rightIcons}> <View style={styles.rightIcons}>
<CustomIcon name='language' size={16} color={themes[theme].auxiliaryText} /> <CustomIcon name='language' size={16} color={colors.auxiliaryText} />
</View> </View>
); );
}); });