commit d20581d1abd6e26ee843a5c1b047f31bbd15a12e
parent 55eb54c1145cea7339c7b2f9d464978cfa2975b2
Author: Henry Unite <unitehenry@gmail.com>
Date: Mon, 11 May 2026 00:27:05 +0000
feat: remove read more
Diffstat:
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/app/src/App.tsx b/app/src/App.tsx
@@ -42,11 +42,7 @@ interface FeedItemComponentProps {
}
function FeedItemComponent({ item }: FeedItemComponentProps) {
- const previewLength = 150
const cleanedText = item.description.replace(/<[^>]*>/g, '').trim()
- const shouldTruncate = cleanedText.length > previewLength
- const previewText = shouldTruncate ? cleanedText.substring(0, previewLength) + '...' : cleanedText
- const displayHtml = item.encoded || item.description
const colorClasses = [
"bg-blue-100 text-blue-800",
@@ -78,16 +74,7 @@ function FeedItemComponent({ item }: FeedItemComponentProps) {
{item.title}
</a>
</h3>
- <p className="text-sm text-muted-foreground mb-2">{previewText}</p>
- {shouldTruncate && (
- <Button variant="link" onClick={() => {
- const blob = new Blob([`<html><body>${displayHtml}</body></html>`], {type: 'text/html'});
- const url = URL.createObjectURL(blob);
- window.open(url, '_blank');
- }} className="block p-0 h-auto text-muted-foreground cursor-pointer mt-2 mb-2">
- Read more
- </Button>
- )}
+ <p className="text-sm text-muted-foreground mb-2">{cleanedText}</p>
<Badge className={`mr-2 ${colorClasses[colorIndex]}`}>{item.feedTitle}</Badge><Badge variant="secondary">{new Date(item.pubDate).toLocaleDateString()}</Badge>
</div>
)