-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* hard coded stakes alliance tokens to 100 dollars (#77) * Fix disconnection issue (#79) Co-authored-by: Alessandro Candeago <[email protected]> * feat: loading optimizations (#80) * Feat/loading optimizations (#267) * fix: receive page bug on desktop * wip: network optimization * wip: network optimization 2 * wip: optimize InitChains comp * wip: optimize InitNetworks comp 2 * wip: optimize InitNetworks comp 3 * wip: optimize InitNetworks comp 4 * cleanup * fix: loading bug * fix: loading bug 2 * cleanup * Fix network validation requests * Add page loader during validation --------- Co-authored-by: Alessandro Candeago <[email protected]> * Fix disconnection issue (#76) --------- Co-authored-by: Alessandro Candeago <[email protected]> --------- Co-authored-by: Joshua Brigati <[email protected]> Co-authored-by: Alessandro Candeago <[email protected]>
- Loading branch information
1 parent
1275aa8
commit 854c610
Showing
13 changed files
with
183 additions
and
143 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
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,25 @@ | ||
import { useNetworkName } from "data/wallet" | ||
import { PropsWithChildren, useMemo } from "react" | ||
import { QueryClient, QueryClientProvider } from "react-query" | ||
|
||
const InitQueryClient = ({ children }: PropsWithChildren<{}>) => { | ||
const queryClient = useQueryClient() | ||
const networkName = useNetworkName() | ||
|
||
return ( | ||
<QueryClientProvider client={queryClient} key={networkName}> | ||
{children} | ||
</QueryClientProvider> | ||
) | ||
} | ||
|
||
const useQueryClient = () => { | ||
const name = useNetworkName() | ||
|
||
return useMemo(() => { | ||
if (!name) throw new Error() | ||
return new QueryClient() | ||
}, [name]) | ||
} | ||
|
||
export default InitQueryClient |
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
Oops, something went wrong.