Skip to content

Commit

Permalink
fix: fix docs site build (#1672)
Browse files Browse the repository at this point in the history
Co-authored-by: dschlabach <[email protected]>
  • Loading branch information
dschlabach and dschlabach authored Nov 26, 2024
1 parent dea2945 commit 2a1f583
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
1 change: 1 addition & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.vercel
20 changes: 4 additions & 16 deletions site/docs/components/AppWithWalletModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import type { ReactNode } from 'react';
import { http, WagmiProvider, createConfig } from 'wagmi';
import { base, baseSepolia } from 'wagmi/chains';
import { coinbaseWallet, walletConnect } from 'wagmi/connectors';
import { coinbaseWallet } from 'wagmi/connectors';
import '@coinbase/onchainkit/styles.css';
import { useTheme } from '../contexts/Theme.tsx';

const VITE_WALLET_CONNECT_PROJECT_ID =
import.meta.env.VITE_WALLET_CONNECT_PROJECT_ID || 'AddOurProjectIdHere';

const queryClient = new QueryClient();
export const queryClient = new QueryClient();

const wagmiConfig = createConfig({
chains: [base, baseSepolia],
Expand All @@ -21,16 +18,6 @@ const wagmiConfig = createConfig({
appName: 'OnchainKit',
preference: 'all',
}),
walletConnect({
projectId: VITE_WALLET_CONNECT_PROJECT_ID,
showQrModal: true,
metadata: {
name: 'OnchainKit',
description: 'build onchain',
url: 'https://onchainkit.xyz/',
icons: [],
},
}),
],
ssr: true,
transports: {
Expand All @@ -44,13 +31,14 @@ export default function AppWithWalletModal({
}: {
children: ReactNode;
}) {
const { theme } = useTheme();

const isServer = typeof window === 'undefined';
if (isServer) {
return null;
}
const viteCdpApiKey = import.meta.env.VITE_CDP_API_KEY;
const viteProjectId = import.meta.env.VITE_CDP_PROJECT_ID;
const { theme } = useTheme();

return (
<WagmiProvider config={wagmiConfig}>
Expand Down

0 comments on commit 2a1f583

Please sign in to comment.