Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP Staging] fix default avatar not showing on native #33752

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading