From c794a8d952d499fc88c5b63f990657a8b7d9df9d Mon Sep 17 00:00:00 2001 From: Lochie Axon Date: Thu, 18 Jan 2024 16:52:43 +1100 Subject: [PATCH] update examples --- examples/cra/src/index.tsx | 17 +++++++++++------ examples/nextjs/pages/_app.tsx | 2 +- examples/vite/src/main.tsx | 17 +++++++++++------ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/examples/cra/src/index.tsx b/examples/cra/src/index.tsx index f756b475..512a9125 100644 --- a/examples/cra/src/index.tsx +++ b/examples/cra/src/index.tsx @@ -5,8 +5,9 @@ import reportWebVitals from './reportWebVitals'; import './index.css'; import App from './App'; -import { WagmiConfig, createConfig } from 'wagmi'; +import { WagmiProvider, createConfig } from 'wagmi'; import { mainnet, polygon, optimism, arbitrum } from 'wagmi/chains'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ConnectKitProvider, getDefaultConfig } from 'connectkit'; const config = createConfig( @@ -19,16 +20,20 @@ const config = createConfig( }) ); +const queryClient = new QueryClient(); + const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); root.render( - - - - - + + + + + + + ); diff --git a/examples/nextjs/pages/_app.tsx b/examples/nextjs/pages/_app.tsx index a22400a2..ee0901da 100644 --- a/examples/nextjs/pages/_app.tsx +++ b/examples/nextjs/pages/_app.tsx @@ -3,8 +3,8 @@ import type { AppProps } from 'next/app'; import { WagmiProvider, createConfig } from 'wagmi'; import { mainnet, polygon, optimism, arbitrum } from 'wagmi/chains'; -import { ConnectKitProvider, getDefaultConfig } from 'connectkit'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { ConnectKitProvider, getDefaultConfig } from 'connectkit'; const config = createConfig( getDefaultConfig({ diff --git a/examples/vite/src/main.tsx b/examples/vite/src/main.tsx index f6f0aad0..4e1d38de 100644 --- a/examples/vite/src/main.tsx +++ b/examples/vite/src/main.tsx @@ -6,8 +6,9 @@ import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; -import { WagmiConfig, createConfig } from 'wagmi'; +import { WagmiProvider, createConfig } from 'wagmi'; import { mainnet, polygon, optimism, arbitrum } from 'wagmi/chains'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ConnectKitProvider, getDefaultConfig } from 'connectkit'; const config = createConfig( @@ -20,16 +21,20 @@ const config = createConfig( }) ); +const queryClient = new QueryClient(); + const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); root.render( - - - - - + + + + + + + );