mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 10:31:35 +00:00
Perf hide animated backgrounds
This commit is contained in:
parent
9a215693e3
commit
fa0781bc36
@ -45,7 +45,7 @@ const Onboarding = ({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const { hostUrl } = useContext<UseAppStoreType>(AppContext);
|
const { setPage } = useContext<UseAppStoreType>(AppContext);
|
||||||
const { garage } = useContext<UseGarageStoreType>(GarageContext);
|
const { garage } = useContext<UseGarageStoreType>(GarageContext);
|
||||||
|
|
||||||
const [step, setStep] = useState<'1' | '2' | '3'>('1');
|
const [step, setStep] = useState<'1' | '2' | '3'>('1');
|
||||||
|
@ -89,7 +89,7 @@ const RobotAvatar: React.FC<Props> = ({
|
|||||||
} else {
|
} else {
|
||||||
setActiveBackground(true);
|
setActiveBackground(true);
|
||||||
}
|
}
|
||||||
}, [shortAlias]); // TODO: should hashId
|
}, [shortAlias]);
|
||||||
|
|
||||||
const statusBadge = (
|
const statusBadge = (
|
||||||
<div style={{ position: 'relative', left: '0.428em', top: '0.07em' }}>
|
<div style={{ position: 'relative', left: '0.428em', top: '0.07em' }}>
|
||||||
@ -115,8 +115,7 @@ const RobotAvatar: React.FC<Props> = ({
|
|||||||
transform: flipHorizontally ? 'scaleX(-1)' : '',
|
transform: flipHorizontally ? 'scaleX(-1)' : '',
|
||||||
border: '0.3px solid #55555',
|
border: '0.3px solid #55555',
|
||||||
filter: 'dropShadow(0.5px 0.5px 0.5px #000000)',
|
filter: 'dropShadow(0.5px 0.5px 0.5px #000000)',
|
||||||
backgroundImage:
|
backgroundImage: activeBackground ? backgroundImage : '',
|
||||||
activeBackground && placeholderType == 'loading' ? backgroundImage : '',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className={className}>
|
<div className={className}>
|
||||||
@ -147,7 +146,7 @@ const RobotAvatar: React.FC<Props> = ({
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [hashId, shortAlias, avatarSrc, statusColor, tooltip, avatarClass]);
|
}, [hashId, shortAlias, avatarSrc, statusColor, tooltip, avatarClass, activeBackground]);
|
||||||
|
|
||||||
const getAvatarWithBadges = useCallback(() => {
|
const getAvatarWithBadges = useCallback(() => {
|
||||||
let component = avatar;
|
let component = avatar;
|
||||||
|
Loading…
Reference in New Issue
Block a user