Skip to content

Commit

Permalink
Merge pull request #33752 from rayane-djouah/fix-default-avatar-not-s…
Browse files Browse the repository at this point in the history
…howing-on-native

[CP Staging] fix default avatar not showing on native

(cherry picked from commit 4aecc34)
  • Loading branch information
mountiny authored and OSBotify committed Dec 29, 2023
1 parent 8199f71 commit 663b713
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/Icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 (
Expand All @@ -76,7 +73,7 @@ function Icon({
src={src}
width={iconWidth}
height={iconHeight}
fill={iconFill}
fill={fill}
hovered={hovered}
pressed={pressed}
contentFit={contentFit}
Expand All @@ -95,7 +92,7 @@ function Icon({
src={src}
width={iconWidth}
height={iconHeight}
fill={iconFill}
fill={fill}
hovered={hovered}
pressed={pressed}
contentFit={contentFit}
Expand Down

0 comments on commit 663b713

Please sign in to comment.