import React, { ReactElement } from 'react' import Link from 'next/link' import Dotdotdot from 'react-dotdotdot' import Price from '@shared/Price' import removeMarkdown from 'remove-markdown' import Publisher from '@shared/Publisher' import AssetType from '@shared/AssetType' import NetworkName from '@shared/NetworkName' import styles from './index.module.css' import { getServiceByName } from '@utils/ddo' import { AssetExtended } from 'src/@types/AssetExtended' import { Prices } from '@context/Prices' export interface AssetTeaserProps { asset: AssetExtended noPublisher?: boolean locale: string prices: Prices currency: string } export default function AssetTeaser({ asset, noPublisher, locale, prices, currency }: AssetTeaserProps): ReactElement { const { name, type, description } = asset.metadata const { datatokens } = asset const isCompute = Boolean(getServiceByName(asset, 'compute')) const accessType = isCompute ? 'compute' : 'access' const { owner } = asset.nft return (
{datatokens[0]?.symbol}

{name}

{!noPublisher && ( )}
{removeMarkdown(description?.substring(0, 300) || '')}
) }