File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -8,31 +8,20 @@ import { capsule } from "@/util/utils";
88import Link from "next/link" ;
99
1010const PreviewCard = ( { paper } : { paper : Paper } ) => {
11-
12- function handleOpen ( event : React . MouseEvent ) {
13- event . stopPropagation ( ) ;
14- const link = document . createElement ( "a" ) ;
15- link . href = paper . finalUrl ;
16- link . target = "_blank" ;
17- link . rel = "noopener noreferrer" ;
18- document . body . appendChild ( link ) ;
19- link . click ( ) ;
20- document . body . removeChild ( link ) ;
21- }
2211 return (
2312 < div
2413 key = { paper . _id }
2514 className = "w-56 space-y-1 rounded-xl border border-black border-opacity-50 p-4 dark:border-[#7480FF]/25"
2615 >
27- < button onClick = { handleOpen } className = "w-full ">
16+ < Link href = { paper . finalUrl } target = "_blank" rel = "noopener noreferrer ">
2817 < Image
2918 src = { paper . thumbnailUrl }
3019 alt = { paper . subject }
3120 width = { 180 }
3221 height = { 180 }
3322 className = "mb-2 h-[150px] w-full object-cover"
3423 />
35- </ button >
24+ </ Link >
3625 < div className = "text-sm font-medium" >
3726 { extractBracketContent ( paper . subject ) }
3827 </ div >
You can’t perform that action at this time.
0 commit comments