Skip to content

Commit

Permalink
Merge pull request #87 from EveripediaNetwork/fix-fix-ssr-state
Browse files Browse the repository at this point in the history
fix ssr state
  • Loading branch information
Royal-lobster authored Dec 8, 2024
2 parents 358b0ed + 3feaf3d commit f8d82b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spotty-jobs-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@everipedia/iq-login": patch
---

adds storage cookie storage
10 changes: 9 additions & 1 deletion src/components/iq-login-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { getDefaultConfig, RainbowKitProvider } from "@rainbow-me/rainbowkit";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { structuralSharing } from "@wagmi/core/query";
import type React from "react";
import { cookieToInitialState, WagmiProvider } from "wagmi";
import {
cookieStorage,
cookieToInitialState,
createStorage,
WagmiProvider,
} from "wagmi";
import type { Chain } from "wagmi/chains";
import { iqWikiTheme } from "../lib/data/rainbow-kit-theme";
import {
Expand Down Expand Up @@ -57,6 +62,9 @@ export function IqLoginProvider({
},
],
multiInjectedProviderDiscovery: false,
storage: createStorage({
storage: cookieStorage,
}),
ssr: true,
});

Expand Down

0 comments on commit f8d82b6

Please sign in to comment.