Fixed no wrap
This commit is contained in:
parent
cd39bc4b9b
commit
8688af33f6
1 changed files with 5 additions and 2 deletions
|
|
@ -26,13 +26,16 @@ export default function ListAnswer({
|
||||||
<Grid item xs={10}>
|
<Grid item xs={10}>
|
||||||
<CreationInfoTag {...{ createdAt, creator }} text='answered' />
|
<CreationInfoTag {...{ createdAt, creator }} text='answered' />
|
||||||
<Typography
|
<Typography
|
||||||
noWrap
|
|
||||||
variant='body1'
|
variant='body1'
|
||||||
component={Link}
|
component={Link}
|
||||||
to={`/questions/${question_id}`}
|
to={`/questions/${question_id}`}
|
||||||
style={{ textDecoration: 'none', color: 'inherit' }}
|
style={{ textDecoration: 'none', color: 'inherit' }}
|
||||||
>
|
>
|
||||||
{text.replace(/<[^>]*>?/gm, '')}
|
{text
|
||||||
|
.replace(/<[^>]*>?/gm, '')
|
||||||
|
.split(' ')
|
||||||
|
.slice(0, 30)
|
||||||
|
.join(' ') + '...'}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
||||||
Reference in a new issue