1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
This commit is contained in:
alexcos20 2020-05-05 12:43:14 +03:00
parent 23aced5f9c
commit 38691369d4
3 changed files with 8 additions and 9 deletions

View File

@ -19,7 +19,7 @@ export default function JobTeaser({ job }: { job: any }) {
const asset = await (ocean as any).assets.resolve(did)
const { attributes } = asset.findServiceByType('metadata')
const { main } = attributes
const link = "/asset/did:op:" + did
const link = '/asset/did:op:' + did
setAssetName(main.name)
setAssetUrl(link as any)
} catch (error) {
@ -33,7 +33,9 @@ export default function JobTeaser({ job }: { job: any }) {
return (
<article className={styles.assetList}>
<div className={styles.listRow}>
<h1><a href={assetUrl}>{assetName}</a></h1>
<h1>
<a href={assetUrl}>{assetName}</a>
</h1>
<div
className={styles.date}
title={`Created on ${job.dateCreated}`}

View File

@ -153,7 +153,7 @@ export default function AssetsJobs({ ddo, ocean }: JobsProps) {
{isPublished ? (
<div className={styles.success}>
<p>Your job started!</p>
<Button link to={'/history/'}>
<Button link to="/history/">
Watch the progress in the history page.
</Button>
</div>

View File

@ -1,17 +1,14 @@
import { Account } from '@oceanprotocol/squid'
export async function getUserJobs(ocean: any, account: string) {
try {
let account: Account
;[account] = await ocean.accounts.list()
await account.authenticate()
const jobList = await ocean.compute.status(account)
return jobList;
return jobList
} catch (error) {
console.error(error)
}
}
}