cursor pointer for references

This commit is contained in:
2025-09-29 10:39:37 +02:00
parent 865623334f
commit 5880eecce0

View File

@@ -7,14 +7,7 @@ import {
TooltipTrigger,
} from "@/components/ui/tooltip";
import { cn } from "@/lib/utils";
import {
BookOpen,
Check,
Copy,
FileText,
Paperclip,
X,
} from "lucide-react";
import { BookOpen, Check, Copy, FileText, Paperclip, X } from "lucide-react";
import Image from "next/image";
import { useState } from "react";
import { TrackedButton } from "./util-tracked-button";
@@ -53,7 +46,6 @@ export function PublicationCard({
const buttonSize = "sm";
const buttonStyle = "ghost";
const handleCopy = () => {
if (navigator.clipboard?.writeText) {
navigator.clipboard
@@ -123,13 +115,12 @@ export function PublicationCard({
return (
<div
className={cn(
"cards flex items-start space-x-4 rounded-lg border p-4",
"cards cursor-pointer flex items-start space-x-4 rounded-lg border p-4",
url,
className
)}
id={bibtexKey}
onClick={handleCardClick}
>
onClick={handleCardClick}>
<div className="pointer-events-none relative h-24 w-24 flex-shrink-0">
{ImageContent}
</div>
@@ -151,8 +142,7 @@ export function PublicationCard({
size={buttonSize}
className="h-7 w-7 cursor-pointer px-2 hover:border"
onClick={handleDownload}
eventName={`${bibtexKey}-bibfile`}
>
eventName={`${bibtexKey}-bibfile`}>
<FileText className="h-4 w-4" />
</TrackedButton>
</TooltipTrigger>
@@ -168,8 +158,7 @@ export function PublicationCard({
size={buttonSize}
className="relative h-7 w-7 cursor-pointer px-2 hover:border"
onClick={handleCopy}
eventName={`${bibtexKey}-copycite`}
>
eventName={`${bibtexKey}-copycite`}>
{copyStatus === "idle" && <Copy className="h-4 w-4" />}
{copyStatus === "success" && (
<Check className="h-4 w-4 text-green-500" />
@@ -190,14 +179,12 @@ export function PublicationCard({
size={buttonSize}
className="h-7 w-7 px-2 hover:border"
onClick={(e) => e.stopPropagation()}
asChild
>
asChild>
<TrackedLink
href={pdfUrl}
target="_blank"
eventName={`${bibtexKey}-pdf`}
rel="noopener noreferrer"
>
rel="noopener noreferrer">
<BookOpen className="h-4 w-4" />
</TrackedLink>
</Button>
@@ -210,4 +197,4 @@ export function PublicationCard({
</div>
</div>
);
};
}