2024-05-14 08:56:54 +00:00
|
|
|
import { useParams } from "next/navigation";
|
2024-03-19 14:38:35 +00:00
|
|
|
import { IssueEmojiReactions, IssueVotes } from "@/components/issues/peek-overview";
|
2024-05-14 08:56:54 +00:00
|
|
|
import { useProject } from "@/hooks/store";
|
|
|
|
|
|
|
|
// type IssueReactionsProps = {
|
|
|
|
// workspaceSlug: string;
|
|
|
|
// projectId: string;
|
|
|
|
// };
|
2023-09-01 11:12:30 +00:00
|
|
|
|
|
|
|
export const IssueReactions: React.FC = () => {
|
2024-05-14 08:56:54 +00:00
|
|
|
const { workspace_slug: workspaceSlug, project_id: projectId } = useParams<any>();
|
|
|
|
|
|
|
|
const { canVote, canReact } = useProject();
|
2023-09-01 11:12:30 +00:00
|
|
|
|
|
|
|
return (
|
2023-12-10 10:18:10 +00:00
|
|
|
<div className="mt-4 flex items-center gap-3">
|
2024-05-14 08:56:54 +00:00
|
|
|
{canVote && (
|
2023-09-01 11:12:30 +00:00
|
|
|
<>
|
2023-12-10 10:18:10 +00:00
|
|
|
<div className="flex items-center gap-2">
|
2024-05-17 12:21:14 +00:00
|
|
|
<IssueVotes workspaceSlug={workspaceSlug} projectId={projectId} />
|
2023-09-01 11:12:30 +00:00
|
|
|
</div>
|
2023-12-10 10:18:10 +00:00
|
|
|
<div className="h-8 w-0.5 bg-custom-background-200" />
|
2023-09-01 11:12:30 +00:00
|
|
|
</>
|
|
|
|
)}
|
2024-05-14 08:56:54 +00:00
|
|
|
{canReact && (
|
2023-12-10 10:18:10 +00:00
|
|
|
<div className="flex items-center gap-2">
|
2024-05-14 08:56:54 +00:00
|
|
|
<IssueEmojiReactions workspaceSlug={workspaceSlug} projectId={projectId} />
|
2023-09-01 11:12:30 +00:00
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|