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

History #3659

Closed
wants to merge 2 commits into from
Closed

History #3659

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
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ export default function CopyToClipboardButton(props: CopyToClipboardType) {
return (
<Button
type="button"
className={`inline-flex bg-[#FFD9CD] text-black w-30 justify-center font-mono ${
active && "animate-[peachTransition_20s_ease-in]"
} ${props.styles}`}
className={`inline-flex text-black w-30 justify-center text-sm font-semibold bg-white border border-grey-100 ${props.styles}`}
onClick={async () => {
setActive(true);
setTimeout(() => setActive(false), 1000);

await navigator.clipboard.writeText(props.textToCopy);
}}
>
<LinkIcon className={props.iconStyle} aria-hidden="true" />
{active ? "Link Copied" : "Share Profile"}
<LinkIcon className={`mt-1 ${props.iconStyle}`} aria-hidden="true" />
<span className="ml-1">
{active ? "Link Copied" : "Share Profile"}
</span>
</Button>
);
}
4 changes: 2 additions & 2 deletions packages/grant-explorer/src/features/common/StatCard.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export function StatCard(props: { title: string; value: string | undefined }) {
return (
<div className="rounded-2xl bg-[#F7F7F7] font-mono p-4">
<div className="rounded-2xl bg-[#F7F7F7] font-mono px-6 py-7">
<div className="text-grey-400 text-4xl">{props.value}</div>
<div className="font-bold text-md pb-4 mt-4">{props.title}</div>
<div className="font-bold text-md mt-6">{props.title}</div>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@ export function DirectDonationsTable(props: { contributions: Contribution[] }) {
<>
<TableHeader />
<Table contributions={props.contributions} />
{props.contributions.length === 0 && (
<div className="text-md mt-2 mb-12">
Direct donations made to projects will appear here.
</div>
)}
</>
);
}

function TableHeader() {
return (
<table className="w-full text-left mx-4">
<table className="w-full text-left">
<thead className="font-sans text-lg">
<tr>
<th className="w-2/5">Project</th>
Expand Down Expand Up @@ -52,7 +47,7 @@ function TableHeader() {
</div>
</div>
</th>
<th className="w-1/5 pl-8">Transaction Information</th>
<th className="text-right mr-10 w-1/5 pl-8">Transaction</th>
</tr>
</thead>
</table>
Expand All @@ -61,7 +56,7 @@ function TableHeader() {

function Table(props: { contributions: Contribution[] }) {
return (
<div className="rounded-lg p-2 py-1">
<div className="rounded-lg py-1">
<div className="overflow-hidden">
<div className="mx-auto">
<div>
Expand Down Expand Up @@ -92,29 +87,31 @@ function Table(props: { contributions: Contribution[] }) {
}

return (
<tr key={contribution.id} className="border-b">
<td className="py-4 lg:px-2 w-2/5">
<tr key={contribution.id}>
<td className="py-4 w-2/5">
<div className="flex items-center">
<div className="flex flex-col sm:flex-row">
{/* Link to the project */}
<Link
className={`underline inline-block lg:pr-2 lg:max-w-[300px] max-w-[75px] 2xl:max-w-fit truncate`}
title={contribution.projectId.trim()}
title={contribution.projectId}
to={`/projects/${contribution.projectId}`}
target="_blank"
>
{contribution.projectId.trim()}
{contribution.application?.project?.name ??
`Project Id: ${contribution.projectId.slice(0, 6) + "..." + contribution.projectId.slice(-6)}`
}
</Link>
</div>
</div>
{/* Display contribution timestamp */}
<div className="text-sm text-gray-500">
<div className="text-sm text-gray-500 mt-1">
{timeAgo(Number(contribution.timestamp))}
</div>
</td>
{/* Display donations */}
<td className="py-4 truncate w-2/5 lg:pl-2">
<span className="font-bold">
<span>
{formattedAmount}{" "}
</span>
<span className="text-grey-400">
Expand Down
Loading
Loading