import React from 'react' import { useOcean } from '@oceanprotocol/react' import { DDO } from '@oceanprotocol/lib' import { useState } from 'react' import { useEffect } from 'react' import shortid from 'shortid' import { MetadataExample } from './MetadataExample' export function AllDdos() { const { chainId, account, ocean } = useOcean() const [ddos, setDdos] = useState() useEffect(() => { async function init() { if (!ocean || !account) return const assets = await ocean.assets.query({ page: 1, offset: 10, query: {}, sort: { created: -1 } }) setDdos(assets.results.slice(0, 4)) } init() }, [ocean, account, chainId]) return ( <>
Assets

{ddos?.map((ddo) => { return (

) })}
) }