import React from 'react' import { Link } from 'gatsby' import Dotdotdot from 'react-dotdotdot' import Price from '@shared/Price' import { DDO } from '@oceanprotocol/lib' import removeMarkdown from 'remove-markdown' import Publisher from '@shared/Publisher' import AssetType from '@shared/AssetType' import NetworkName from '@shared/NetworkName' import styles from './AssetTeaser.module.css' declare type AssetTeaserProps = { ddo: DDO price: BestPrice noPublisher?: boolean } const AssetTeaser: React.FC = ({ ddo, price, noPublisher }: AssetTeaserProps) => { const { attributes } = ddo.findServiceByType('metadata') const { name, type } = attributes.main const { dataTokenInfo } = ddo const isCompute = Boolean(ddo?.findServiceByType('compute')) const accessType = isCompute ? 'compute' : 'access' const { owner } = ddo.publicKey[0] return (
{dataTokenInfo?.symbol}

{name}

{!noPublisher && ( )}
{removeMarkdown( attributes?.additionalInformation?.description?.substring( 0, 300 ) || '' )}
) } export default AssetTeaser