mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
title length limit added
This commit is contained in:
parent
3228880826
commit
bfaea0c276
1 changed files with 3 additions and 1 deletions
|
|
@ -5,6 +5,8 @@ import Icon, { dataUrl as iconDataUrl } from 'stremio-icons/dom';
|
|||
import colors from 'stremio-colors';
|
||||
import styles from './styles';
|
||||
|
||||
const MAX_TITLE_SYMBOLS = 100;
|
||||
|
||||
const renderPoster = (poster) => {
|
||||
if (poster.length === 0) {
|
||||
return null;
|
||||
|
|
@ -26,7 +28,7 @@ const renderTitle = (number, title) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className={styles['title']}>{number}. {title}</div>
|
||||
<div className={styles['title']}>{number}. {title.length > MAX_TITLE_SYMBOLS ? title.slice(0, MAX_TITLE_SYMBOLS) + '...' : title}</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue