Skip to content

Commit

Permalink
[NO CHANGELOG] [Add Tokens Widget] Add tokens input focus by default (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mimi-imtbl authored Nov 12, 2024
1 parent 266257d commit 67491ec
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,12 @@ export function AddTokens({

const showInitialEmptyState = !selectedToken;

useEffect(() => {
if (inputRef.current && !showInitialEmptyState) {
inputRef.current.focus();
}
}, [showInitialEmptyState]);

const shouldShowBackButton = showBackButton && onBackButtonClick;
const routeInputsReady = !!selectedToken
&& !!fromAddress
Expand Down

0 comments on commit 67491ec

Please sign in to comment.