Skip to content

Commit

Permalink
feat(research): clickable article tags
Browse files Browse the repository at this point in the history
  • Loading branch information
vihangpatil committed Aug 8, 2023
1 parent 7afd3f0 commit 68e6bf4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as React from 'react';
import styles from './styles.module.scss';
import ArticleAuthor from './ArticleAuthor';
import { Typography, Tag, Space, Grid } from 'antd';
import Link from "next/link";

const { Text } = Typography;
const { useBreakpoint } = Grid;
Expand Down Expand Up @@ -32,7 +33,9 @@ const ArticleSidebar: React.FC<ArticleSidebarProps> = ({ authors, tags }) => {
<Text type="secondary">Related Tags</Text>
<Space wrap size={[0, 8]}>
{tags.map((tag) => (
<Tag key={tag.title}>{tag.title}</Tag>
<Link key={`${tag.title}-link`} href={`/articles?tags=${tag.title}`}>
<Tag key={tag.title}>{tag.title}</Tag>
</Link>
))}
</Space>
</div>
Expand Down

0 comments on commit 68e6bf4

Please sign in to comment.