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-18 05:09:04 -07:00
parent 38691369d4
commit 99fa2e965b
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import React, { useEffect, useState, useContext } from 'react'
import { User } from '../../context'
import moment from 'moment'
import shortid from 'shortid'
import styles from './JobTeaser.module.scss'
import Dotdotdot from 'react-dotdotdot'
@ -59,7 +60,10 @@ export default function JobTeaser({ job }: { job: any }) {
<>
<div>Output URL</div>
{job.resultsUrl.map((result: string) => (
<a href={result}> {result.substring(0, 52)}...</a>
<a href={result} key={shortid.generate()}>
{' '}
{result.substring(0, 52)}...
</a>
))}
</>
) : (

View File

@ -4,9 +4,10 @@ export async function getUserJobs(ocean: any, account: string) {
try {
let account: Account
;[account] = await ocean.accounts.list()
const account = await ocean.accounts.list()
await account.authenticate()
const jobList = await ocean.compute.status(account)
const jobList = await ocean.compute.status(account[0])
return jobList
} catch (error) {
console.error(error)