Hey Guys
I’m having a issue with the Opensea clone. I have checked the file oath for this error and I’ve
checked my SearchCollections.jsx and I have imported it correctly. Can someone help me please?
Cheers
SearchCollections.jsx
import { Select } from "antd";
import { useMoralisDapp } from "providers/MoralisDappProvider/MoralisDappProvider";
import { getCollectionsByChain } from "helpers/collections";
function SearchCollections({ setInputValue }) {
const { Option } = Select;
const { chainId } = useMoralisDapp();
const NFTCollections = getCollectionsByChain(chainId);
function onChange(value) {
setInputValue(value);
}
return (
<>
<Select
showSearch
style={{ width: "1000px", marginLeft: "20px" }}
placeholder="Find a Collection"
optionFilterProp="children"
onChange={onChange}
>
{NFTCollections &&
NFTCollections.map((collection, i) => (
<Option value={collection.addrs} key={i}>
{collection.name}
</Option>
))}
</Select>
</>
);
}
export default SearchCollections;