-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: receive page bug on desktop (#264) * Feat/loading optimizations (#267) * Fix network validation requests * Add page loader during validation --------- Co-authored-by: Alessandro Candeago <[email protected]> * hard coded stakes alliance tokens to 100 dollars (#269) --------- Co-authored-by: Alessandro Candeago <[email protected]> Co-authored-by: Joshua Brigati <[email protected]>
- Loading branch information
1 parent
c4ff877
commit b4306a1
Showing
10 changed files
with
160 additions
and
129 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
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
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.