File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,12 +27,6 @@ function formatNumber(count: number): string {
2727 return count . toString ( )
2828}
2929
30- function truncateDescription ( desc : string | null , maxLength = 120 ) : string {
31- if ( ! desc ) return 'A CodingWithCalvin project'
32- if ( desc . length <= maxLength ) return desc
33- return desc . substring ( 0 , maxLength - 3 ) + '...'
34- }
35-
3630export function SocialPreviewTemplate ( {
3731 repo,
3832 logoFullBase64,
@@ -237,15 +231,17 @@ export function SocialPreviewTemplate({
237231 />
238232
239233 { /* Description */ }
240- < span
234+ < div
241235 style = { {
242236 color : COLORS . gray ,
243237 fontSize : '26px' ,
244- lineHeight : 1.5 ,
245- marginTop : '16px'
238+ lineHeight : 1.4 ,
239+ marginTop : '16px' ,
240+ flex : 1 ,
241+ overflow : 'hidden'
246242 } } >
247- { truncateDescription ( repo . description , 200 ) }
248- </ span >
243+ { repo . description || 'A CodingWithCalvin project' }
244+ </ div >
249245 </ div >
250246 </ div >
251247
You can’t perform that action at this time.
0 commit comments