diff --git a/example/next/package.json b/example/next/package.json index 3a856d2..a09fe5d 100644 --- a/example/next/package.json +++ b/example/next/package.json @@ -13,6 +13,7 @@ "@emotion/react": "11.11.1", "@emotion/styled": "11.11.0", "@leapwallet/cosmos-social-login-capsule-provider-ui": "^0.0.58", + "@tanstack/react-query": "5.62.0", "framer-motion": "^10.16.4", "graz": "workspace:*", "next": "^13.4.19", diff --git a/example/next/pages/_app.tsx b/example/next/pages/_app.tsx index 8c32f32..7d40684 100644 --- a/example/next/pages/_app.tsx +++ b/example/next/pages/_app.tsx @@ -1,37 +1,42 @@ import { ChakraProvider, extendTheme } from "@chakra-ui/react"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { GrazProvider } from "graz"; import type { NextPage } from "next"; import type { AppProps } from "next/app"; import { chains } from "utils/graz"; +const queryClient = new QueryClient(); + const theme = extendTheme(); const CustomApp: NextPage = ({ Component, pageProps }) => { return ( - { - console.log("reconnect failed"); - }, - autoReconnect: false, - walletConnect: { - options: { - projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID, + + { + console.log("reconnect failed"); + }, + autoReconnect: false, + walletConnect: { + options: { + projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID, + }, + }, + capsuleConfig: { + apiKey: process.env.NEXT_PUBLIC_CAPSULE_API_KEY, + env: process.env.NEXT_PUBLIC_CAPSULE_ENV, + }, + iframeOptions: { + allowedIframeParentOrigins: ["https://daodao.zone", "https://dao.daodao.zone", "http://localhost:3000"], }, - }, - capsuleConfig: { - apiKey: process.env.NEXT_PUBLIC_CAPSULE_API_KEY, - env: process.env.NEXT_PUBLIC_CAPSULE_ENV, - }, - iframeOptions: { - allowedIframeParentOrigins: ["https://daodao.zone", "https://dao.daodao.zone", "http://localhost:3000"], - }, - }} - > - - + }} + > + + + ); }; diff --git a/example/starter/package.json b/example/starter/package.json index 527fe62..62fee96 100644 --- a/example/starter/package.json +++ b/example/starter/package.json @@ -16,6 +16,7 @@ "@emotion/styled": "11.11.0", "@graz-sh/types": "^0.0.4", "@leapwallet/cosmos-social-login-capsule-provider-ui": "^0.0.58", + "@tanstack/react-query": "5.62.0", "bignumber.js": "^9.1.2", "framer-motion": "^10.16.4", "graz": "workspace:*", diff --git a/example/starter/src/pages/_app.tsx b/example/starter/src/pages/_app.tsx index 30c0458..a763425 100644 --- a/example/starter/src/pages/_app.tsx +++ b/example/starter/src/pages/_app.tsx @@ -1,9 +1,12 @@ import { ChakraProvider, extendTheme } from "@chakra-ui/react"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { GrazProvider } from "graz"; import type { AppProps } from "next/app"; import { Layout } from "src/ui/layout"; import { mainnetChains } from "src/utils/graz"; +const queryClient = new QueryClient(); + const theme = extendTheme({ semanticTokens: { colors: { @@ -21,34 +24,36 @@ const theme = extendTheme({ const MyApp = ({ Component, pageProps }: AppProps) => { return ( - + - - - - - - + }} + > + + + + + + + ); }; diff --git a/example/vite/package.json b/example/vite/package.json index 19541b5..f2e58cc 100644 --- a/example/vite/package.json +++ b/example/vite/package.json @@ -9,6 +9,7 @@ "preview": "vite preview" }, "dependencies": { + "@tanstack/react-query": "5.62.0", "graz": "workspace:*", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/example/vite/src/main.tsx b/example/vite/src/main.tsx index 0203087..15e2758 100644 --- a/example/vite/src/main.tsx +++ b/example/vite/src/main.tsx @@ -1,5 +1,6 @@ import "./index.css"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { GrazProvider } from "graz"; import { cosmoshub } from "graz/chains"; import * as React from "react"; @@ -7,14 +8,23 @@ import * as ReactDOM from "react-dom/client"; import App from "./App"; +const queryClient = new QueryClient(); + ReactDOM.createRoot(document.getElementById("root")!).render( - - - + + + + + , ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d70010b..4085618 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -78,6 +78,9 @@ importers: '@leapwallet/cosmos-social-login-capsule-provider-ui': specifier: ^0.0.58 version: 0.0.58(@cosmjs/proto-signing@0.31.3)(@types/react-dom@18.2.7)(@types/react@18.2.21)(csstype@3.1.2)(osmojs@15.2.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(protobufjs@7.2.3)(react-dom@18.2.0(react@18.2.0))(stridejs@0.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(tailwindcss@3.3.3)(zod@3.23.8) + '@tanstack/react-query': + specifier: 5.62.0 + version: 5.62.0(react@18.2.0) framer-motion: specifier: ^10.16.4 version: 10.16.4(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -130,6 +133,9 @@ importers: '@leapwallet/cosmos-social-login-capsule-provider-ui': specifier: ^0.0.58 version: 0.0.58(@cosmjs/proto-signing@0.31.3)(@types/react-dom@18.2.7)(@types/react@18.2.21)(csstype@3.1.2)(osmojs@15.2.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))(protobufjs@7.2.3)(react-dom@18.2.0(react@18.2.0))(stridejs@0.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(tailwindcss@3.3.3)(zod@3.23.8) + '@tanstack/react-query': + specifier: 5.62.0 + version: 5.62.0(react@18.2.0) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -173,6 +179,9 @@ importers: example/vite: dependencies: + '@tanstack/react-query': + specifier: 5.62.0 + version: 5.62.0(react@18.2.0) graz: specifier: workspace:* version: link:../../packages/graz