-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add RainbowKit and React Query dependencies; update layout and …
…components for integration
- Loading branch information
1 parent
c0e12ae
commit 7d30afe
Showing
11 changed files
with
353 additions
and
253 deletions.
There are no files selected for viewing
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
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
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,34 @@ | ||
'use client'; | ||
|
||
import React, { useState, useEffect } from 'react'; | ||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; | ||
import { WagmiProvider } from 'wagmi'; | ||
import { RainbowKitProvider, darkTheme } from '@rainbow-me/rainbowkit'; | ||
import { config } from '~~/utils/rainbowConfig'; | ||
|
||
// Create QueryClient outside of component | ||
const queryClient = new QueryClient(); | ||
|
||
export function RainbowKitProviders({ children }: { children: React.ReactNode }) { | ||
const [mounted, setMounted] = useState(false); | ||
|
||
useEffect(() => { | ||
setMounted(true); | ||
}, []); | ||
|
||
return ( | ||
<WagmiProvider config={config}> | ||
<QueryClientProvider client={queryClient}> | ||
<RainbowKitProvider | ||
theme={darkTheme({ | ||
accentColor: '#11ce6f', | ||
accentColorForeground: 'white', | ||
borderRadius: 'large', | ||
})} | ||
> | ||
{mounted && children} | ||
</RainbowKitProvider> | ||
</QueryClientProvider> | ||
</WagmiProvider> | ||
); | ||
} |
Oops, something went wrong.