[SOLVED] The React form calls Web3Api to useMoralisWeb3ApiCall

The React form calls Web3Api to useMoralisWeb3ApiCall

But the parameter list keeps prompting problems

reference:
https://v1docs.moralis.io/moralis-dapp/web3-api/native#runcontractfunction

This is an excerpt of the call code

    const { native } = useMoralisWeb3Api();
    const ABI = SearchInterface_ABI;

    const chainId = "0x61";
    const options = {
      chain: chainId,
      address: "0x3cc749570223215Adf6980d6BA3C07b7F2B24C5c",
      function_name: "getLandInfoById",
      abi: ABI,
      params: { landId: 102 },
    };

    const { fetch, data, error, isLoading } = useMoralisWeb3ApiCall(
      native.runContractFunction,
      {
        ...options
      },
    );

Error message:

webpack compiled with 1 error
ERROR in src/views/Home.tsx:36:47
TS2552: Cannot find name 'useMoralisWeb3ApiCall'. Did you mean 'useMoralisWeb3Api'?
    34 |     };
    35 |
  > 36 |     const { fetch, data, error, isLoading } = useMoralisWeb3ApiCall(      
       |                                               ^^^^^^^^^^^^^^^^^^^^^
    37 |       native.runContractFunction,
    38 |       {
    39 |         ...options

Did you import it from react-moralis ?

import { useMoralisWeb3ApiCall } from "react-moralis";

The problem was solved your way

Thank you for your reply