Skip to content

Instantly share code, notes, and snippets.

@covelitein
Created September 19, 2023 19:55
Show Gist options
  • Save covelitein/e023e124fd0de692322838ca1430f166 to your computer and use it in GitHub Desktop.
Save covelitein/e023e124fd0de692322838ca1430f166 to your computer and use it in GitHub Desktop.
dappworks
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