diff --git a/src/pages/Accounts/components/AccountItem.tsx b/src/pages/Accounts/components/AccountItem.tsx index e47c3731..dbd64ef0 100644 --- a/src/pages/Accounts/components/AccountItem.tsx +++ b/src/pages/Accounts/components/AccountItem.tsx @@ -13,6 +13,7 @@ import { ForwardedRef, forwardRef, useCallback, + useEffect, useMemo, useRef, useState, @@ -79,6 +80,18 @@ export const AccountItem = forwardRef( const address = network ? getAddressForChain(network.chainId, account) : ''; const [cardHovered, setCardHovered] = useState(false); const itemRef = useRef(null); + const firstPageload = useRef(true); + + useEffect(() => { + if (isActive) { + const behavior = firstPageload.current ? 'instant' : 'smooth'; + itemRef?.current?.scrollIntoView({ + block: 'center', + behavior, + }); + } + firstPageload.current = false; + }, [isActive]); const toggle = useCallback( (accountId: string) => {