Skip to content

Commit 9017110

Browse files
committed
fix: ensure createAppKit is called before useAppKit hooks
- Changed main.tsx to import wagmiConfig from appkit.ts - This ensures createAppKit() is initialized before any components use useAppKit() - Fixes 'Please call createAppKit before using useAppKit hook' error
1 parent 71f1812 commit 9017110

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
44
import { WagmiProvider } from "wagmi";
55
import App from "./App";
66
import "./index.css";
7-
import { wagmiConfig } from "./lib/wagmi";
7+
// IMPORTANT: Import from appkit.ts to ensure createAppKit is called before any components
8+
import { wagmiConfig } from "./lib/appkit";
89
import { LenisProvider } from "./hooks/useLenis";
910

1011
const queryClient = new QueryClient();

0 commit comments

Comments
 (0)