Skip to content

Commit

Permalink
Fix autodetect tokens link not jumping to section in settings (#20978)
Browse files Browse the repository at this point in the history
When clicking the link to enable token autodetection in settings, you land at the top of the settings page instead of jumping to the specific setting.

Also fixes a bug where the import tokens modal did not automatically close when clicking the link.
  • Loading branch information
bergeron authored Sep 21, 2023
1 parent f844dcf commit 31262a0
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ export const ImportTokensModal = ({ onClose }) => {
className="import-tokens-modal__autodetect"
onClick={() => {
history.push(
`${SECURITY_ROUTE}#advanced-settings-autodetect-tokens`,
`${SECURITY_ROUTE}#auto-detect-tokens`,
);
onClose();
}}
Expand Down Expand Up @@ -505,11 +505,12 @@ export const ImportTokensModal = ({ onClose }) => {
<ButtonLink
type="link"
key="import-token-token-detection-announcement"
onClick={() =>
onClick={() => {
history.push(
`${SECURITY_ROUTE}#advanced-settings-autodetect-tokens`,
)
}
`${SECURITY_ROUTE}#auto-detect-tokens`,
);
onClose();
}}
>
{t('inYourSettings')}
</ButtonLink>,
Expand Down

0 comments on commit 31262a0

Please sign in to comment.