1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
This commit is contained in:
Matthias Kretschmann 2020-09-10 19:33:11 +02:00
parent 85b0643693
commit 5b36da54d2
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 14 additions and 7 deletions

View File

@ -15,6 +15,7 @@ const AssetTeaser: React.FC<AssetTeaserProps> = ({
ddo,
metadata
}: AssetTeaserProps) => {
// TODO: hacky safeguard should be replaced with search query to account for pagination
if (!metadata.additionalInformation) return null
const { name } = metadata.main

View File

@ -26,7 +26,7 @@
}
/* Data Token Icon Style */
.icon[class*='DT'] path {
.icon:not([class*='OCEAN']) path {
fill: var(--brand-violet);
}

View File

@ -14,7 +14,7 @@
display: flex;
justify-content: center;
font-size: var(--font-size-small);
margin-top: calc(var(--spacer) / 2);
margin-top: calc(var(--spacer) / 4);
}
.dataTokenLinks a {

View File

@ -45,11 +45,15 @@ const AssetList: React.FC<AssetListProps> = ({ queryResult }) => {
<div className={styles.assetList}>
{queryResult && queryResult.totalResults > 0 ? (
queryResult.results.map((ddo: DDO) => {
const { attributes }: MetadataMarket = ddo.findServiceByType(
'metadata'
)
const { attributes } = ddo.findServiceByType('metadata')
return <AssetTeaser ddo={ddo} metadata={attributes} key={ddo.id} />
return (
<AssetTeaser
ddo={ddo}
metadata={(attributes as unknown) as MetadataMarket}
key={ddo.id}
/>
)
})
) : (
<div className={styles.empty}>

View File

@ -14,7 +14,9 @@ async function getLatestAssets(metadataStoreUri: string) {
const result = await metadataStore.queryMetadata({
page: 1,
offset: 10,
// TODO: hacky workaround because some assets pushed by external devs are faulty
// See molecules/AssetTeaser.tsx
offset: 100,
query: {},
sort: { created: -1 }
})