-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a special hook for init global toasts
- Loading branch information
1 parent
37ce916
commit 1107ecf
Showing
6 changed files
with
14 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./useInitGlobalToasts" | ||
export * from "./useShowWalletErrorToast" | ||
export * from "./useToast" |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { useShowWalletErrorToast } from "./useShowWalletErrorToast" | ||
|
||
export function useInitGlobalToasts() { | ||
useShowWalletErrorToast("ethereum") | ||
useShowWalletErrorToast("bitcoin") | ||
} |
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
File renamed without changes.
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,14 +1,13 @@ | ||
import { useSentry } from "./sentry" | ||
import { useInitializeAcreSdk } from "./useInitializeAcreSdk" | ||
import { useFetchBTCPriceUSD } from "./useFetchBTCPriceUSD" | ||
import { useShowWalletErrorToast } from "./useShowWalletErrorToast" | ||
import { useInitGlobalToasts } from "./toasts/useInitGlobalToasts" | ||
|
||
export function useInitApp() { | ||
// TODO: Let's uncomment when dark mode is ready | ||
// useDetectThemeMode() | ||
useSentry() | ||
useInitializeAcreSdk() | ||
useFetchBTCPriceUSD() | ||
useShowWalletErrorToast("ethereum") | ||
useShowWalletErrorToast("bitcoin") | ||
useInitGlobalToasts() | ||
} |