RainbowKit登录窗口出现两个相同的MetaMask按钮?
import React from 'react';
import {
darkTheme,
getDefaultConfig,
RainbowKitProvider,
} from '@rainbow-me/rainbowkit';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { WagmiProvider } from 'wagmi';
import { optimism, optimismSepolia } from 'wagmi/chains';
const config = getDefaultConfig({
appName: 'APPName',
projectId: 'YOUR_PROJECT_ID',
chains: [optimism, optimismSepolia],
ssr: true, // If your dApp uses server side rendering (SSR)
});
const queryClient = new QueryClient();
const RainbowKit = (props) => {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<RainbowKitProvider theme={darkTheme()} locale="en">
{props.children}
</RainbowKitProvider>
</QueryClientProvider>
</WagmiProvider>
);
};
export default RainbowKit;