Skip to content

Commit 88aee95

Browse files
authored
chore: add read more in changelogs (#482)
1 parent 9d9b9bb commit 88aee95

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/components/pages/changelog/posts-list/posts-list.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const PostsList = ({ posts, page, pageCount }: PostsListProps) => {
2929
const date = new Date(updated_at);
3030
const formattedDate = format(date, 'MMM dd, yyyy');
3131
const preview = getPostPreview(content);
32+
const isFullLoaded = preview === content;
3233

3334
return (
3435
<li key={slug} className={clsx(index !== 0 && 'border-gray-90 sm:border-t sm:pt-7')}>
@@ -70,6 +71,14 @@ const PostsList = ({ posts, page, pageCount }: PostsListProps) => {
7071
</Link>
7172
</h2>
7273
<Content content={preview} className="content-sm mt-9 lg:mt-6 md:mt-5" />
74+
{!isFullLoaded && (
75+
<Link
76+
href={`${Route.CHANGELOG}/${slug}`}
77+
className="text-14 font-semibold leading-none text-primary-1 hover:underline"
78+
>
79+
Read more
80+
</Link>
81+
)}
7382
</div>
7483
</article>
7584
</li>

0 commit comments

Comments
 (0)