Skip to content

Commit

Permalink
Add payment tx links in /my-grants
Browse files Browse the repository at this point in the history
  • Loading branch information
Pabl0cks committed Mar 23, 2024
1 parent 6d17bc3 commit 0769f95
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/nextjs/app/my-grants/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SubmitModal } from "./_components/SubmitModal";
import { NextPage } from "next";
import useSWR from "swr";
import { useAccount } from "wagmi";
import { ArrowTopRightOnSquareIcon } from "@heroicons/react/20/solid";
import { GrantData } from "~~/services/database/schema";
import { PROPOSAL_STATUS } from "~~/utils/grants";

Expand Down Expand Up @@ -50,6 +51,29 @@ const MyGrants: NextPage = () => {
)}
<p className="m-0">{grant.description}</p>
<p className={`badge ${badgeBgColor[grant.status]}`}>{grant.status}</p>
{(grant.status === PROPOSAL_STATUS.APPROVED ||
grant.status === PROPOSAL_STATUS.SUBMITTED ||
grant.status === PROPOSAL_STATUS.COMPLETED) &&
grant.approvedTx && (
<a
href={grant.approvedTx}
target="_blank"
rel="noopener noreferrer"
className="ml-4 underline underline-offset-4 text-xs"
>
50% approve tx <ArrowTopRightOnSquareIcon className="h-4 w-4 inline" />
</a>
)}
{grant.status === PROPOSAL_STATUS.COMPLETED && grant.completedTx && (
<a
href={grant.completedTx}
target="_blank"
rel="noopener noreferrer"
className="ml-4 underline underline-offset-4 text-xs"
>
50% complete tx <ArrowTopRightOnSquareIcon className="h-4 w-4 inline" />
</a>
)}
{grant.status === PROPOSAL_STATUS.APPROVED && (
<button onClick={() => openModal(grant)} className="btn btn-primary float-right">
Submit build
Expand Down

0 comments on commit 0769f95

Please sign in to comment.