pancake-swap-exchange-testnet
pancake-swap-exchange-testnet copied to clipboard
This error pops up at launch; DefaultTheme is not assignable to parameter of type React.Context
I have this error, and nothing is clickable on the webpage.
Failed to compile.
C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/src/components/Popups/PopupItem.tsx TypeScript error in C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/src/components/Popups/PopupItem.tsx(69,28): Argument of type 'import("C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/node_modules/@types/react-redux/node_modules/@types/react/index").Context<import("C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/node_modules/@types/styled-components/index").DefaultTheme>' is not assignable to parameter of type 'React.Context<import("C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/node_modules/@types/styled-components/index").DefaultTheme>'. Types of property 'Provider' are incompatible. Type 'import("C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/node_modules/@types/react-redux/node_modules/@types/react/index").Provider<import("C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/node_modules/@types/styled-components/index").DefaultTheme>' is not assignable to type 'React.Provider<import("C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/node_modules/@types/styled-components/index").DefaultTheme>'. Types of parameters 'props' and 'props' are incompatible. Type 'React.ProviderProps<import("C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/node_modules/@types/styled-components/index").DefaultTheme>' is not assignable to type 'import("C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/node_modules/@types/react-redux/node_modules/@types/react/index").ProviderProps<import("C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/node_modules/@types/styled-components/index").DefaultTheme>'. Types of property 'children' are incompatible. Type 'React.ReactNode' is not assignable to type 'import("C:/Users/HP/solidity_works/pancake_nguyen/pancake-swap-exchange-testnet/node_modules/@types/react-redux/node_modules/@types/react/index").ReactNode'. Type '{}' is not assignable to type 'ReactNode'. TS2345
67 | }, [removeAfterMs, removeThisPopup])
68 |
69 | const theme = useContext(ThemeContext) | ^ 70 | 71 | let popupContent 72 | if ('txn' in content) {
The same error occurs