mirror of
https://github.com/bakhirev/assayo.git
synced 2025-01-19 00:47:48 +00:00
update
This commit is contained in:
parent
10e39d967e
commit
6a75b3b0be
File diff suppressed because one or more lines are too long
|
@ -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}
|
||||||
|
|
Loading…
Reference in a new issue