From 4601bb8706e911491849b23dd94deba516f406b7 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Fri, 9 Oct 2020 16:10:00 +0300 Subject: [PATCH] fix Signed-off-by: mihaisc --- src/components/pages/History/ComputeJobs.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/pages/History/ComputeJobs.tsx b/src/components/pages/History/ComputeJobs.tsx index f80c12300..c24c33167 100644 --- a/src/components/pages/History/ComputeJobs.tsx +++ b/src/components/pages/History/ComputeJobs.tsx @@ -85,7 +85,7 @@ const columns = [ export default function ComputeJobs(): ReactElement { const { ocean, account } = useOcean() - const [jobs] = useState() + const [jobs,setJobs] = useState() 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)