Merge branch 'fix-effect' into 'next'
Remove conditional to run style logic See merge request soapbox-pub/soapbox-fe!1142
This commit is contained in:
commit
e0b1abdfc0
3 changed files with 8 additions and 10 deletions
|
@ -94,18 +94,16 @@ const Account = ({
|
|||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
if (isOnScreen) {
|
||||
const style: React.CSSProperties = {};
|
||||
const actionWidth = actionRef.current?.clientWidth;
|
||||
const style: React.CSSProperties = {};
|
||||
const actionWidth = actionRef.current?.clientWidth;
|
||||
|
||||
if (overflowRef.current) {
|
||||
style.maxWidth = overflowRef.current.clientWidth - 30 - avatarSize - actionWidth;
|
||||
} else {
|
||||
style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
setStyle(style);
|
||||
if (overflowRef.current) {
|
||||
style.maxWidth = overflowRef.current.clientWidth - 30 - avatarSize - actionWidth;
|
||||
} else {
|
||||
style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
setStyle(style);
|
||||
}, [isOnScreen, overflowRef, actionRef]);
|
||||
|
||||
if (!account) {
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue