From 88aee95b4a46dfc6eb2233ed6a7091393d17666c Mon Sep 17 00:00:00 2001 From: boojack Date: Wed, 11 Dec 2024 17:44:59 +0800 Subject: [PATCH] chore: add read more in changelogs (#482) --- src/components/pages/changelog/posts-list/posts-list.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/pages/changelog/posts-list/posts-list.tsx b/src/components/pages/changelog/posts-list/posts-list.tsx index dd4f752a..3e416124 100644 --- a/src/components/pages/changelog/posts-list/posts-list.tsx +++ b/src/components/pages/changelog/posts-list/posts-list.tsx @@ -29,6 +29,7 @@ const PostsList = ({ posts, page, pageCount }: PostsListProps) => { const date = new Date(updated_at); const formattedDate = format(date, 'MMM dd, yyyy'); const preview = getPostPreview(content); + const isFullLoaded = preview === content; return (
  • @@ -70,6 +71,14 @@ const PostsList = ({ posts, page, pageCount }: PostsListProps) => { + {!isFullLoaded && ( + + Read more + + )}