11"use client" ;
22
3- import clsx from ' clsx' ;
4- import { useEffect , useRef , useState } from ' react' ;
3+ import clsx from " clsx" ;
4+ import { useEffect , useRef , useState } from " react" ;
55
6- import { FormattedDate } from './formatted-date' ;
76import Image from "next/image" ;
7+ import Link from "next/link" ;
8+ import { FormattedDate } from "./formatted-date" ;
89
910export const img = function Img ( props : React . ComponentProps < typeof Image > ) {
1011 return (
@@ -22,14 +23,14 @@ export const img = function Img(props: React.ComponentProps<typeof Image>) {
2223function ContentWrapper ( {
2324 className,
2425 ...props
25- } : React . ComponentPropsWithoutRef < ' div' > ) {
26+ } : React . ComponentPropsWithoutRef < " div" > ) {
2627 return (
2728 < div className = "mx-auto max-w-7xl px-6 lg:flex lg:px-8" >
2829 < div className = "lg:ml-96 lg:flex lg:w-full lg:justify-end lg:pl-32" >
2930 < div
3031 className = { clsx (
31- ' mx-auto max-w-lg lg:mx-0 lg:w-0 lg:max-w-xl lg:flex-auto' ,
32- className ,
32+ " mx-auto max-w-lg lg:mx-0 lg:w-0 lg:max-w-xl lg:flex-auto" ,
33+ className
3334 ) }
3435 { ...props }
3536 />
@@ -50,22 +51,22 @@ function ArticleHeader({
5051 return (
5152 < header className = "relative mb-10 xl:mb-0" >
5253 < div className = "pointer-events-none absolute left-[max(-0.5rem,calc(50%-18.625rem))] top-0 z-50 flex h-4 items-center justify-end gap-x-2 lg:left-0 lg:right-[calc(max(2rem,50%-38rem)+40rem)] lg:min-w-[32rem] xl:h-8" >
53- < a href = { `/${ collection } /${ slug } / ` } className = "inline-flex" >
54+ < Link href = { `/${ collection } /${ slug } ` } className = "inline-flex" >
5455 < FormattedDate
5556 date = { date }
5657 className = "hidden xl:pointer-events-auto xl:block xl:text-xs/4 xl:font-medium xl:text-white/50"
5758 />
58- </ a >
59+ </ Link >
5960 < div className = "h-[0.0625rem] w-3.5 bg-gray-400 lg:-mr-3.5 xl:mr-0 xl:bg-gray-300" />
6061 </ div >
6162 < ContentWrapper >
6263 < div className = "flex" >
63- < a href = { `/${ collection } /${ slug } / ` } className = "inline-flex" >
64+ < Link href = { `/${ collection } /${ slug } ` } className = "inline-flex" >
6465 < FormattedDate
6566 date = { date }
6667 className = "text-xs/4 font-medium text-gray-500 dark:text-white/50 xl:hidden"
6768 />
68- </ a >
69+ </ Link >
6970 </ div >
7071 </ ContentWrapper >
7172 </ header >
@@ -83,7 +84,7 @@ export const ArticleItem = function Article({
8384 date : string | Date ;
8485 children : React . ReactNode ;
8586} ) {
86- const heightRef = useRef < React . ElementRef < ' div' > > ( null ) ;
87+ const heightRef = useRef < React . ElementRef < " div" > > ( null ) ;
8788 const [ heightAdjustment , setHeightAdjustment ] = useState ( 0 ) ;
8889
8990 useEffect ( ( ) => {
@@ -124,7 +125,7 @@ export const ArticleItem = function Article({
124125export const code = function Code ( {
125126 highlightedCode,
126127 ...props
127- } : React . ComponentPropsWithoutRef < ' code' > & { highlightedCode ?: string } ) {
128+ } : React . ComponentPropsWithoutRef < " code" > & { highlightedCode ?: string } ) {
128129 if ( highlightedCode ) {
129130 return (
130131 < code { ...props } dangerouslySetInnerHTML = { { __html : highlightedCode } } />
0 commit comments