diff --git a/src/components/projects/Project.jsx b/src/components/projects/Project.jsx index 9bcca57..bd3add8 100644 --- a/src/components/projects/Project.jsx +++ b/src/components/projects/Project.jsx @@ -184,7 +184,7 @@ const getAvatarSrc = assets => { function Project({ classes, match, profile, transfers, pledges, projectAddedEvents }) { const projectId = match.params.id const urlName = match.params[0] - const { projectAge, projectAssets, manifest } = useProjectData(projectId, projectAddedEvents) + const { account, projectAge, projectAssets, manifest } = useProjectData(projectId, projectAddedEvents) const amountsPledged = useMemo(() => getAmountsPledged(pledges), [pledges, projectId]) const numberOfBackers = useMemo(() => getNumberOfBackers(pledges), [pledges, projectId]) @@ -197,6 +197,9 @@ function Project({ classes, match, profile, transfers, pledges, projectAddedEven 100 ) : 0 const profileType = profile[0] ? profile[0].type : urlName + const addr = profile[0] ? profile[0].addr.toUpperCase() : null + const accountUpper = account ? account.toUpperCase() : account + const userIsOwner = addr === accountUpper console.log({profile, projectAssets, mediaUrl, mediaType, amountsPledged, pledges, transfers, match}) return ( {!projectAssets && } @@ -248,9 +251,12 @@ function Project({ classes, match, profile, transfers, pledges, projectAddedEven days active
- + {!userIsOwner && - + } + {userIsOwner && + + }
diff --git a/src/components/projects/hooks.js b/src/components/projects/hooks.js index 5572965..71a01bc 100644 --- a/src/components/projects/hooks.js +++ b/src/components/projects/hooks.js @@ -126,6 +126,7 @@ export function useProjectData(projectId, projectAddedEvents) { const manifest = useMemo(() => getProjectManifest(projectAssets), [projectAssets, projectId]) return { + account, projectAge, projectAssets, manifest,