forked from Vero-protocol/vero-guardian-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVoteCard.tsx
More file actions
29 lines (25 loc) · 910 Bytes
/
Copy pathVoteCard.tsx
File metadata and controls
29 lines (25 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
'use client';
import { useWallet } from '@/context/WalletContext';
import VoteButton from '@/components/VoteButton';
import { useTranslation } from 'react-i18next';
export interface PR {
id: number;
title: string;
author: string;
url: string;
}
export default function VoteCard({ pr }: { pr: PR }) {
const { t } = useTranslation();
const { publicKey } = useWallet();
return (
<div className="flex items-center justify-between gap-4 rounded-xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 p-4 shadow-sm">
<div className="min-w-0">
<h3 className="truncate font-semibold text-slate-900 dark:text-white">{pr.title}</h3>
<p className="text-sm text-slate-500 dark:text-slate-400">
{t('prs.summary', { id: pr.id, author: pr.author })}
</p>
</div>
<VoteButton prId={pr.id} publicKey={publicKey} />
</div>
);
}