From bfaea0c276b2156a1af97bb421f2bf0d47492ce5 Mon Sep 17 00:00:00 2001 From: svetlagasheva Date: Thu, 22 Nov 2018 18:12:20 +0200 Subject: [PATCH] title length limit added --- src/common/Video/Video.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/Video/Video.js b/src/common/Video/Video.js index 778bcdef7..1964a9b93 100644 --- a/src/common/Video/Video.js +++ b/src/common/Video/Video.js @@ -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 ( -
{number}. {title}
+
{number}. {title.length > MAX_TITLE_SYMBOLS ? title.slice(0, MAX_TITLE_SYMBOLS) + '...' : title}
); }