From 3f7e8f9f182bc0a8f0e07140d7cfc40bbc5b41ab Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Wed, 15 Apr 2020 15:33:08 +0300 Subject: [PATCH] fix get jobs --- client/src/components/molecules/JobTeaser.tsx | 5 +- client/src/utils/getUserJobs.ts | 46 ++++--------------- 2 files changed, 12 insertions(+), 39 deletions(-) diff --git a/client/src/components/molecules/JobTeaser.tsx b/client/src/components/molecules/JobTeaser.tsx index b5c354a..2d4444b 100644 --- a/client/src/components/molecules/JobTeaser.tsx +++ b/client/src/components/molecules/JobTeaser.tsx @@ -7,6 +7,7 @@ import Dotdotdot from 'react-dotdotdot' export default function JobTeaser({ job }: { job: any }) { const { ocean } = useContext(User) const [assetName, setAssetName] = useState() + const [assetUrl, setAssetUrl] = useState() useEffect(() => { async function getAsset() { try { @@ -18,7 +19,9 @@ 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 setAssetName(main.name) + setAssetUrl(link as any) } catch (error) { console.log(error) } @@ -30,7 +33,7 @@ export default function JobTeaser({ job }: { job: any }) { return (
-

{assetName}

+

{assetName}