mirror of
https://github.com/hyperspacedev/hyperspace
synced 2025-02-02 10:27:20 +01:00
Truncate descriptions that are over 500 chars
This commit is contained in:
parent
572b34f79e
commit
143ca3dae5
@ -151,7 +151,12 @@ export class Post extends React.Component<any, IPostState> {
|
||||
<CardActionArea href={status.card.url} target="_blank" rel="noreferrer">
|
||||
<CardContent>
|
||||
<Typography gutterBottom variant="h6" component="h2">{status.card.title}</Typography>
|
||||
<Typography>{status.card.description || "No description provided. Click with caution."}</Typography>
|
||||
<Typography>
|
||||
{
|
||||
status.card.description.slice(0, 500) + (status.card.description.length > 500? "...": "")
|
||||
|| "No description provided. Click with caution."
|
||||
}
|
||||
</Typography>
|
||||
</CardContent>
|
||||
{
|
||||
status.card.image && status.media_attachments.length <= 0?
|
||||
|
Loading…
x
Reference in New Issue
Block a user