-
-
Save covelitein/e023e124fd0de692322838ca1430f166 to your computer and use it in GitHub Desktop.
dappworks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { | |
DeleteJob, | |
Header, | |
JobListingOwnerActions, | |
Payout, | |
UpdateJob, | |
} from '../components' | |
import { useGlobalState } from '../store' | |
const MyProjects = () => { | |
const [myjobs] = useGlobalState('myjobs') | |
const [connectedAccount] = useGlobalState('connectedAccount') | |
return ( | |
<div> | |
<Header /> | |
<div className="px-5 my-7"> | |
{myjobs.map((myjob, i) => ( | |
<JobListingOwnerActions | |
key={i} | |
jobListing={myjob} | |
editable={myjob.owner == connectedAccount} | |
/> | |
))} | |
{myjobs.length < 1 && ( | |
<h2 className="text-lg text-gray-500">No Posted Jobs Yet</h2> | |
)} | |
<UpdateJob /> | |
<DeleteJob /> | |
<Payout /> | |
</div> | |
</div> | |
) | |
} | |
export default MyProjects |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment