1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
mihaisc 2020-10-09 16:10:00 +03:00
parent c49e0b1288
commit 4601bb8706
No known key found for this signature in database
GPG Key ID: 4FB0C2329B4C6E29

View File

@ -85,7 +85,7 @@ const columns = [
export default function ComputeJobs(): ReactElement {
const { ocean, account } = useOcean()
const [jobs] = useState<ComputeJob[]>()
const [jobs,setJobs] = useState<ComputeJob[]>()
const [isLoading, setIsLoading] = useState(false)
const [userAgreed, setUserAgreed] = useState(false)
@ -99,13 +99,13 @@ export default function ComputeJobs(): ReactElement {
100
)
console.log('orders', orderHistory)
// const userJobs = await ocean.compute.status(account)
const userJobs = await ocean.compute.status(account)
// setJobs(userJobs.sort((a, b) => {
// if (a.dateCreated > b.dateCreated) return -1
// if (a.dateCreated < b.dateCreated) return 1
// return 0
// }))
setJobs(userJobs.sort((a, b) => {
if (a.dateCreated > b.dateCreated) return -1
if (a.dateCreated < b.dateCreated) return 1
return 0
}))
setUserAgreed(true)
} catch (e) {
console.log(e)