diff --git a/src/components/right/RightHeader.tsx b/src/components/right/RightHeader.tsx index 7cb1e12a0..a192f3247 100644 --- a/src/components/right/RightHeader.tsx +++ b/src/components/right/RightHeader.tsx @@ -288,14 +288,10 @@ const RightHeader: FC = ({ const buttonClassName = buildClassName( 'animated-close-icon', + isBackButton && 'state-back', (shouldSkipTransition || shouldSkipAnimation) && 'no-transition', ); - // Add class in the next AF to synchronize with animation with Transition components - useEffect(() => { - backButtonRef.current!.classList.toggle('state-back', isBackButton); - }, [isBackButton]); - return (