Skip to content

Commit

Permalink
feature: add description links to comments and history
Browse files Browse the repository at this point in the history
  • Loading branch information
olexh committed May 11, 2024
1 parent e538235 commit 62319ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/(pages)/(root)/components/comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const Comments: FC<Props> = ({ className }) => {
image={item.author.avatar}
imageRatio={1}
description={item.text}
descriptionHref={`${CONTENT_TYPE_LINKS[item.content_type]}/${item.slug}`}
key={item.created}
title={item.author.username}
href={`/u/${item.author.username}`}
Expand Down
1 change: 1 addition & 0 deletions app/(pages)/comments/latest/components/comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const Comments: FC<Props> = ({ className }) => {
image={item.author.avatar}
imageRatio={1}
description={item.text}
descriptionHref={`${CONTENT_TYPE_LINKS[item.content_type]}/${item.slug}`}
key={item.created}
title={item.author.username}
href={`/u/${item.author.username}`}
Expand Down
2 changes: 2 additions & 0 deletions components/history-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ const HistoryItem: FC<Props> = (props) => {
title={data.content?.title || 'Загальне'}
href={data.content ? `/anime/${data.content.slug}` : '#'}
description={<Activity {...props} />}
descriptionClassName="line-clamp-2"
descriptionHref={data.content && `/anime/${data.content.slug}`}
createdAt={data.created}
image={
data.content?.poster || (
Expand Down

0 comments on commit 62319ef

Please sign in to comment.