Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add batch badge to grant card #78

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/nextjs/app/admin/_components/GrantReview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const GrantReview = ({ grant, selected, toggleSelection }: GrantReviewPro
const completeActionDisableToolTip = isCompleteActionDisabled && `Please switch to chain: ${grant.txChainId}`;

return (
<div className="border p-4 my-4">
<div className="border border-4 rounded-lg p-4 my-4">
<div className="flex justify-between mb-2">
<div className="font-bold flex flex-col gap-1 lg:gap-2 lg:flex-row items-baseline">
<h1 className="text-lg m-0">{grant.title}</h1>
Expand Down Expand Up @@ -100,6 +100,9 @@ export const GrantReview = ({ grant, selected, toggleSelection }: GrantReviewPro
<div className="flex gap-4 items-center">
<Address address={grant.builder} link={`https://app.buidlguidl.com/builders/${grant.builder}`} />
<BuilderSocials socialLinks={grant.builderData?.socialLinks} />
{grant.builderData?.builderBatch && (
<div className="badge badge-outline">Batch #{grant.builderData.builderBatch}</div>
)}
</div>
<p>{grant.description}</p>
<div className="flex gap-2 lg:gap-4 mt-4 justify-between">
Expand All @@ -112,7 +115,9 @@ export const GrantReview = ({ grant, selected, toggleSelection }: GrantReviewPro
</button>
<div className="flex gap-2 lg:gap-4">
<button
className={`btn btn-sm btn-neutral ${isLoading ? "opacity-50" : ""} ${completeActionDisableClassName}`}
className={`btn btn-sm btn-success border-2 bg-transparent ${
isLoading ? "opacity-50" : ""
} ${completeActionDisableClassName}`}
data-tip={completeActionDisableToolTip}
onClick={async () => {
const resHash = await splitEqualETH({
Expand Down
4 changes: 2 additions & 2 deletions packages/nextjs/app/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const AdminPage = () => {
onClick={() => handleBatchAction(newGrants, "approve")}
disabled={selectedApproveGrants.length === 0}
>
Batch Approve
Batch Send + Approve
</button>
)}
</div>
Expand All @@ -109,7 +109,7 @@ const AdminPage = () => {
onClick={() => handleBatchAction(completedGrants, "complete")}
disabled={selectedCompleteGrants.length === 0}
>
Batch Complete
Batch Send + Complete
</button>
)}
</div>
Expand Down
1 change: 1 addition & 0 deletions packages/nextjs/services/database/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type BuilderData = {
builds?: Build[];
status?: Status;
graduated?: Graduated;
builderBatch?: string;
};

export type BuilderDataResponse = {
Expand Down
Loading