mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Update popular-threads-box.tsx
This commit is contained in:
@@ -20,11 +20,8 @@ interface PopularThreadProps {
|
||||
|
||||
const ContentPreview = ({ content, maxLength = 99 }: { content: string; maxLength?: number }) => {
|
||||
const plainText = removeMarkdown(content).trim().replaceAll(' ', '').replace(/\n\n/g, '\n').replaceAll('\n\n', '');
|
||||
|
||||
const truncatedText = plainText.length > maxLength ? `${plainText.substring(0, maxLength).trim()}...` : plainText;
|
||||
|
||||
console.log(content);
|
||||
|
||||
return truncatedText;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user