-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3024 from near/wallet-migration-ux-improvements
Wallet migration UX improvements
- Loading branch information
Showing
6 changed files
with
171 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 14 additions & 6 deletions
20
...tend/src/components/wallet-migration/modals/WalletSelectorModal/WalletSelectorContent.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
import { useEffect } from 'react'; | ||
import { useLocation } from 'react-router-dom'; | ||
|
||
import { useExportAccountSelector } from './WalletSelectorExportContext'; | ||
|
||
export const WalletSelectorContent = () => { | ||
const { ExportModal } = useExportAccountSelector(); | ||
|
||
const location = useLocation(); | ||
useEffect(() => { | ||
//TODO: this is to mute css class injected from WalletSelectorGetAWallet component | ||
const walletWrapperDiv = document.getElementById('near-wallet-selector-modal'); | ||
walletWrapperDiv?.classList.remove('wallet-selector-get-a-wallet-modal'); | ||
ExportModal?.show(); | ||
}); | ||
if (ExportModal) { | ||
//TODO: this is to mute css class injected from WalletSelectorGetAWallet component | ||
const walletWrapperDiv = document.getElementById('near-wallet-selector-modal'); | ||
walletWrapperDiv?.classList.remove('wallet-selector-get-a-wallet-modal'); | ||
ExportModal?.show(); | ||
} | ||
}, [ExportModal]); | ||
|
||
// On location change, close the modal | ||
useEffect(() => { | ||
ExportModal?.hide(); | ||
}, [location]); | ||
return null; | ||
}; |
Oops, something went wrong.