article card uses next link
This commit is contained in:
1 parent
0b47b12d27
commit
93d9021ac0
1 file changed
+4
-1
@@ -3,6 +3,7 @@ import './styles.css'
|
||||
import cx from 'classnames'
|
||||
import { Date } from './Date'
|
||||
import { IImage } from 'src/types'
|
||||
import Link from 'next/link'
|
||||
|
||||
export interface IArticleCardProps {
|
||||
article: any
|
||||
@@ -11,7 +12,8 @@ export interface IArticleCardProps {
|
||||
|
||||
export const ArticleCard: React.FC<IArticleCardProps> = ({ article, ...props }) => (
|
||||
<section className="ArticleCard">
|
||||
<a className="invisible" href={article.url}>
|
||||
<Link href={article.url}>
|
||||
<a className="invisible">
|
||||
<div className="ArticleCard-image">
|
||||
{!props.preview ? null : (
|
||||
<picture>
|
||||
@@ -35,5 +37,6 @@ export const ArticleCard: React.FC<IArticleCardProps> = ({ article, ...props })
|
||||
)}
|
||||
</div>
|
||||
</a>
|
||||
</Link>
|
||||
</section>
|
||||
)
|
||||
Reference in new issue
Block a user