fix navigation

pull/3637/head
Aniket-Engg 2 years ago committed by Aniket
parent 462c9d239a
commit b9c78bce9c
  1. 2
      apps/etherscan/src/app/views/CaptureKeyView.tsx

@ -27,7 +27,7 @@ export const CaptureKeyView: React.FC = () => {
if (apiKey.length === 34) {
setAPIKey(values.apiKey)
clientInstance.call('notification' as any, 'toast', 'API key saved successfully!!!')
navigate((location.state as any).from)
navigate((location && location.state ? location.state : '/'))
} else clientInstance.call('notification' as any, 'toast', 'API key should be 34 characters long')
}}
>

Loading…
Cancel
Save