-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60f164c
commit a61ff68
Showing
4 changed files
with
61 additions
and
43 deletions.
There are no files selected for viewing
Binary file not shown.
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,48 @@ | ||
"use client"; | ||
|
||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | ||
import { ConnectKitProvider, getDefaultConfig } from "connectkit"; | ||
import { HashRouter } from "react-router-dom"; | ||
import { WagmiProvider, createConfig } from "wagmi"; | ||
import { optimism } from "wagmi/chains"; | ||
import { BackfillContextProvider } from "../context/backfillContext"; | ||
import { ConfigContextProvider } from "../context/configContext"; | ||
import "./globals.css"; | ||
|
||
const config = createConfig( | ||
getDefaultConfig({ | ||
chains: [optimism], | ||
walletConnectProjectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID!, | ||
appName: "Farcaster Signer Manager", | ||
}) | ||
); | ||
|
||
const queryClient = new QueryClient({ | ||
defaultOptions: { | ||
queries: { | ||
gcTime: 1000 * 60 * 60 * 24, // 24 hours | ||
}, | ||
}, | ||
}); | ||
|
||
export default function Providers({ | ||
children, | ||
}: Readonly<{ | ||
children: React.ReactNode; | ||
}>) { | ||
return ( | ||
<WagmiProvider config={config}> | ||
<QueryClientProvider client={queryClient}> | ||
<ConnectKitProvider> | ||
<ConfigContextProvider> | ||
<BackfillContextProvider> | ||
{typeof window !== "undefined" ? ( | ||
<HashRouter>{children}</HashRouter> | ||
) : null} | ||
</BackfillContextProvider> | ||
</ConfigContextProvider> | ||
</ConnectKitProvider> | ||
</QueryClientProvider> | ||
</WagmiProvider> | ||
); | ||
} |
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