Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
Cannot assign theme in React

I need to compile a UniswapV2 fork, but it doesn't want to compile. The error is below.

TypeScript error in /src/components/AccountDetails/index.tsx(230,28): Argument of type 'import("/node_modules/@types/react-redux/node_modules/@types/react/index").Context<import("/node_modules/@types/styled-components/index").DefaultTheme>' is not assignable to parameter of type 'React.Context<import("/node_modules/@types/styled-components/index").DefaultTheme>'. TS2345

        228 | }: AccountDetailsProps) {
        229 |   const { chainId, account, connector } = useActiveWeb3React()
      > 230 |   const theme = useContext(ThemeContext)
            |                            ^
        231 |   const dispatch = useDispatch<AppDispatch>()
        232 | 
        233 |   function formatConnectorName() {

Theme context is defined like this:

export const ThemeContext: React.Context<AnyIfEmpty<DefaultTheme>>;
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!