Problem of using wormhole widget in next js

inside this it give me error Cannot read properties of undefined (reading ‘ReactCurrentDispatcher’) kindly guide it work proper in react but problem in next js :
import React from “react”;
// import “@wormhole-foundation/wormhole-connect/styles.css”;
import WormholeConnect, {
WormholeConnectConfig,
WormholeConnectTheme
} from “@wormhole-foundation/wormhole-connect”;

export default function DynamicConnectWalletComponent() {
// Example config
const config: WormholeConnectConfig = {
env: “testnet”,
chains: [“Ethereum”, “Solana”],
tokens: [“FTTsep”, “FTTsol”],
bridgeDefaults: {
fromNetwork: “Ethereum”,
toNetwork: “Solana”,
fromToken: “FTTsep”,
toToken: “FTTsol”,
},
tokensConfig: {
FTTsep: {
key: “FTTsep”,
symbol: “FTT”,
nativeChain: “Ethereum”,
displayName: “FTT (Ethereum)”,
tokenId: {
chain: “Ethereum”,
address: “0xF7cbc69c6259Cf06582EEDF9477D58a15Dc5332e”,
},
coinGeckoId: “test”,
icon: “https://wormhole.com/token.png”,
color: “#00C3D9”,
decimals: {
Ethereum: 18,
default: 8,
},
},
FTTsol: {
key: “FTTsol”,
symbol: “FTT”,
nativeChain: “Solana”,
displayName: “FTT (Solana)”,
tokenId: {
chain: “Solana”,
address: “GCzVVsjMjkg8EpoidnFW9bqegwhbp1GWGpzuSfhH6fyB”,
},
coinGeckoId: “test”,
icon: “https://wormhole.com/token.png”,
color: “#00C3D9”,
decimals: {
Solana: 9,
default: 8,
},
},
},
};

// Example theme
const theme: WormholeConnectTheme = {
colors: {
primary: “#00C3D9”,
secondary: “#00C3D9”,
background: “#1A1A1A”,
text: “#FFFFFF”,
textSecondary: “#A0A0A0”,
border: “#333333”,
error: “#FF0000”,
},
fonts: {
primary: “Roboto, sans-serif”,
},
};

return (


My Wormhole Connect App


{/* Pass the config/theme objects here */}


);
}