Commit 95f61487 authored by Nate Wienert's avatar Nate Wienert Committed by GitHub

fix: uniswapx opt in double bounce animation (#6964)

parent 3ed3ed49
......@@ -72,16 +72,11 @@ const OptInContents = ({
const [, setRouterPreference] = useRouterPreference()
const dispatch = useAppDispatch()
const [showYoureIn, setShowYoureIn] = useState(false)
const [isVisible, setIsVisible] = useState(false)
const isVisible = isOnClassic
// adding this as we need to mount and then set shouldAnimate = true after it mounts to avoid a flicker on initial mount
const [shouldAnimate, setShouldAnimate] = useState(false)
// delayed a second to allow mount animation
useEffect(() => {
setIsVisible(Boolean(trade && isOnClassic))
}, [isOnClassic, trade])
useEffect(() => {
if (!isVisible || shouldAnimate) return
// delay visible animation a bit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment