This commit is contained in:
bakhirev 2024-12-03 02:06:48 +03:00
parent 10e39d967e
commit 6a75b3b0be
2 changed files with 9 additions and 8 deletions

File diff suppressed because one or more lines are too long

View file

@ -21,7 +21,7 @@ function getTextWithLink(text: string, className?: string) {
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
className={className || ''} className={className || ''}
to={link} to={link || ''}
> >
{title} {title}
</Link> </Link>
@ -84,14 +84,15 @@ function Description({ text, style, className }: IDescriptionProps) {
? (text || '').trim().split(/\n+/gm) ? (text || '').trim().split(/\n+/gm)
: text; : text;
const items = paragraphs.map((paragraph) => { const items = paragraphs.map((paragraph, index: number) => {
const prefix = paragraph.substring(0, 2); const prefix = paragraph.substring(0, 2);
const mainText = paragraph.substring(2); const mainText = paragraph.substring(2);
const key = `${mainText}${index}`;
if (prefix === '- ') { if (prefix === '- ') {
return ( return (
<List <List
key={mainText} key={key}
text={mainText} text={mainText}
style={style} style={style}
className={className} className={className}
@ -102,7 +103,7 @@ function Description({ text, style, className }: IDescriptionProps) {
if (prefix === '# ') { if (prefix === '# ') {
return ( return (
<Title <Title
key={mainText} key={key}
text={mainText} text={mainText}
style={style} style={style}
className={className} className={className}
@ -112,7 +113,7 @@ function Description({ text, style, className }: IDescriptionProps) {
return ( return (
<SimpleText <SimpleText
key={mainText} key={key}
text={paragraph} text={paragraph}
style={style} style={style}
className={className} className={className}