11import Image from "next/image"
22import Link from "next/link"
33
4- import { absoluteUrl , formatDate } from "lib/utils"
4+ import { formatDate } from "lib/utils"
55import { Article } from "types"
66
77interface NodeArticleTeaserProps {
@@ -11,10 +11,8 @@ interface NodeArticleTeaserProps {
1111export function NodeArticleTeaser ( { node, ...props } : NodeArticleTeaserProps ) {
1212 return (
1313 < article { ...props } >
14- < Link href = { node . path } passHref >
15- < a className = "no-underline hover:text-blue-600" >
16- < h2 className = "mb-4 text-4xl font-bold" > { node . title } </ h2 >
17- </ a >
14+ < Link href = { node . path } className = "no-underline hover:text-blue-600" >
15+ < h2 className = "mb-4 text-4xl font-bold" > { node . title } </ h2 >
1816 </ Link >
1917 < div className = "mb-4 text-gray-600" >
2018 { node . author ?. displayName ? (
@@ -31,27 +29,26 @@ export function NodeArticleTeaser({ node, ...props }: NodeArticleTeaserProps) {
3129 src = { node . image . url }
3230 width = { 768 }
3331 height = { 480 }
34- layout = "responsive"
35- objectFit = "cover"
3632 alt = { node . title }
3733 />
3834 </ figure >
3935 ) }
40- < Link href = { node . path } passHref >
41- < a className = "inline-flex items-center px-6 py-2 border border-gray-600 rounded-full hover:bg-gray-100" >
42- Read article
43- < svg
44- viewBox = "0 0 24 24"
45- fill = "none"
46- stroke = "currentColor"
47- strokeWidth = "2"
48- strokeLinecap = "round"
49- strokeLinejoin = "round"
50- className = "w-4 h-4 ml-2"
51- >
52- < path d = "M5 12h14M12 5l7 7-7 7" />
53- </ svg >
54- </ a >
36+ < Link
37+ href = { node . path }
38+ className = "inline-flex items-center px-6 py-2 border border-gray-600 rounded-full hover:bg-gray-100"
39+ >
40+ Read article
41+ < svg
42+ viewBox = "0 0 24 24"
43+ fill = "none"
44+ stroke = "currentColor"
45+ strokeWidth = "2"
46+ strokeLinecap = "round"
47+ strokeLinejoin = "round"
48+ className = "w-4 h-4 ml-2"
49+ >
50+ < path d = "M5 12h14M12 5l7 7-7 7" />
51+ </ svg >
5552 </ Link >
5653 </ article >
5754 )
0 commit comments