Skip to content

Commit

Permalink
udpate timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
gusibi committed Oct 1, 2024
1 parent eb6376b commit 901d8a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/Timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ const formatDate = (dateString: string, showYear = false) => {
}
}
const truncatedBody = (post: BlogPost) => {
const truncatedBody = (post: string) => {
const maxLength = 400;
if (post.body.length <= maxLength) {
return post.body;
if (post.length <= maxLength) {
return post;
}
return post.body.slice(0, maxLength).trim() + '...';
return post.slice(0, maxLength).trim() + '...';
}
const renderLabels = (labels: Array<{ color: string; name: string }>) => {
Expand Down

0 comments on commit 901d8a2

Please sign in to comment.