Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 632 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 632 Rev 633
Línea 21... Línea 21...
21
    (fullStringText = "") => {
21
    (fullStringText = "") => {
22
      if (typeof fullStringText !== "string") {
22
      if (typeof fullStringText !== "string") {
23
        return "";
23
        return "";
24
      }
24
      }
Línea -... Línea 25...
-
 
25
 
-
 
26
      const htmlParsedText = parse(fullStringText);
25
 
27
 
26
      if (fullStringText.length > 500) {
28
      if (htmlParsedText.length > 500) {
27
        const shortenedString = fullStringText.substring(0, 500);
29
        const shortenedString = htmlParsedText.substring(0, 500);
Línea 28... Línea 30...
28
        const shortenedText = parse(`${shortenedString}... `);
30
        const shortenedText = `${shortenedString}...`;
29
 
31
 
30
        return (
32
        return (
31
          <>
33
          <>
32
            {isReadMoreActive ? fullStringText : shortenedText}
34
            {isReadMoreActive ? shortenedString : shortenedText}
33
            <StyledViewMore onClick={readMore}>
35
            <StyledViewMore onClick={readMore}>
34
              {isReadMoreActive ? read_less : read_more}
36
              {isReadMoreActive ? read_less : read_more}
35
            </StyledViewMore>
37
            </StyledViewMore>
36
          </>
38
          </>
Línea 37... Línea 39...
37
        );
39
        );
38
      }
40
      }
39
 
41
 
40
      return fullStringText;
42
      return htmlParsedText;
Línea 41... Línea 43...
41
    },
43
    },