From 663b713490c4c2e3b15c3b79772024a098dddaf5 Mon Sep 17 00:00:00 2001 From: Vit Horacek <36083550+mountiny@users.noreply.github.com> Date: Fri, 29 Dec 2023 20:42:37 +0100 Subject: [PATCH] Merge pull request #33752 from rayane-djouah/fix-default-avatar-not-showing-on-native [CP Staging] fix default avatar not showing on native (cherry picked from commit 4aecc346a33bcb29cd594642318425316c793dba) --- src/components/Icon/index.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/Icon/index.tsx b/src/components/Icon/index.tsx index 6b3dcf7f126a..732fe90deae2 100644 --- a/src/components/Icon/index.tsx +++ b/src/components/Icon/index.tsx @@ -3,7 +3,6 @@ import React from 'react'; import {StyleProp, View, ViewStyle} from 'react-native'; import ImageSVG from '@components/ImageSVG'; import useStyleUtils from '@hooks/useStyleUtils'; -import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import variables from '@styles/variables'; import IconAsset from '@src/types/utils/IconAsset'; @@ -57,13 +56,11 @@ function Icon({ testID = '', contentFit = 'cover', }: IconProps) { - const theme = useTheme(); const StyleUtils = useStyleUtils(); const styles = useThemeStyles(); const iconWidth = small ? variables.iconSizeSmall : width; const iconHeight = small ? variables.iconSizeSmall : height; const iconStyles = [StyleUtils.getWidthAndHeightStyle(width ?? 0, height), IconWrapperStyles, styles.pAbsolute, additionalStyles]; - const iconFill = fill ?? theme.icon; if (inline) { return ( @@ -76,7 +73,7 @@ function Icon({ src={src} width={iconWidth} height={iconHeight} - fill={iconFill} + fill={fill} hovered={hovered} pressed={pressed} contentFit={contentFit} @@ -95,7 +92,7 @@ function Icon({ src={src} width={iconWidth} height={iconHeight} - fill={iconFill} + fill={fill} hovered={hovered} pressed={pressed} contentFit={contentFit}