-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Victor
committed
Jun 30, 2023
1 parent
dad90f7
commit 407eddb
Showing
4 changed files
with
13 additions
and
11 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
10 changes: 5 additions & 5 deletions
10
...pp/components/guards/walletResetGuard.tsx → ...pp/components/guards/walletCloseGuard.tsx
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,17 +1,17 @@ | ||
import { useSingleTabGuard } from '@components/guards/singleTab'; | ||
|
||
type WalletResetGuardProps = { | ||
type WalletCloseGuardProps = { | ||
children?: React.ReactElement | React.ReactElement[]; | ||
}; | ||
|
||
/** | ||
* This guard is used to close any open tabs when the wallet is reset. | ||
* This guard is used to close any open tabs when the wallet is locked or reset. | ||
* It should only be rendered at the root of the options page. | ||
*/ | ||
function WalletResetGuard({ children }: WalletResetGuardProps): React.ReactNode { | ||
useSingleTabGuard('resetWallet', false); | ||
function WalletCloseGuard({ children }: WalletCloseGuardProps): React.ReactNode { | ||
useSingleTabGuard('closeWallet', false); | ||
|
||
return children; | ||
} | ||
|
||
export default WalletResetGuard; | ||
export default WalletCloseGuard; |
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