Update button behavior to work as link

This commit is contained in:
Hazem Krimi
2021-12-12 14:56:22 +01:00
parent b2453ae6dd
commit 08dc652d25
14 changed files with 1261 additions and 1100 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ const Index: FC<Props> = ({ blogPosts }) => {
<div className='articles-wrapper'>
{blogPosts.length !== 0 ? (
blogPosts.map(({ slug, ...rest }) => (
<Card {...rest} key={slug} onClick={() => router.push(`/blog/${slug}`)} />
<Card {...rest} key={slug} href={`/blog/${slug}`} />
))
) : (
<h4>Nothing for now</h4>