-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(namadillo): querying next rpc if the previous one fails (#1479)
- Loading branch information
1 parent
ba0bfa5
commit 4b87ef6
Showing
8 changed files
with
71 additions
and
48 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,24 @@ | ||
import { queryClient } from "App/Common/QueryProvider"; | ||
import { getDefaultStore } from "jotai"; | ||
import { queryClientAtom } from "jotai-tanstack-query"; | ||
import { Provider as JotaiProvider } from "jotai/react"; | ||
import { useHydrateAtoms } from "jotai/utils"; | ||
|
||
type StorageProviderProps = { children: JSX.Element }; | ||
|
||
const HydrateAtoms = (props: { children: JSX.Element }): JSX.Element => { | ||
useHydrateAtoms([[queryClientAtom, queryClient]]); | ||
return props.children; | ||
}; | ||
|
||
export const defaultStore = getDefaultStore(); | ||
|
||
export const StorageProvider = ({ | ||
children, | ||
}: StorageProviderProps): JSX.Element => { | ||
return ( | ||
<JotaiProvider store={defaultStore}> | ||
<HydrateAtoms>{children}</HydrateAtoms> | ||
</JotaiProvider> | ||
); | ||
}; |
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
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
4b87ef6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://namada-interface-dev.netlify.app as production
🚀 Deployed on https://677d88483812213573ab893d--namada-interface-dev.netlify.app