Skip to content

Commit 598df35

Browse files
committed
fix: codderabbitai comment
1 parent 8b076c5 commit 598df35

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

web/src/components/Popup/MiniGuides/DisputeResolver/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const leftPageContents = [
2020
title: "Parameters",
2121
paragraphs: [
2222
"Define some parameters:",
23-
"• Choose a court to arbitrate the case.<br/>• Select a category.<br/>• Select the number of jurors.",
23+
"• Choose a court to arbitrate the case.\n• Select a category.\n• Select the number of jurors.",
2424
"The more jurors you select, higher the arbitration cost will be. By default we use 3 jurors for the first " +
2525
"round. The arbitration cost is the value used to pay the jurors for their work.",
2626
],

web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ const StyledParagraph = styled.p`
5252

5353
const extractGuideName = (linkText) => linkText.split(". ")[1];
5454

55+
const processNewLineInParagraph = (paragraph: string) => {
56+
return paragraph.split("\n").map((text, index) => (
57+
<React.Fragment key={index}>
58+
{index > 0 && <br />}
59+
{text}
60+
</React.Fragment>
61+
));
62+
};
63+
5564
const LeftContent: React.FC<{
5665
currentPage: number;
5766
leftPageContents: {
@@ -68,7 +77,7 @@ const LeftContent: React.FC<{
6877
<Title>{title}</Title>
6978
<ParagraphsContainer>
7079
{paragraphs.map((paragraph, index) => (
71-
<StyledParagraph key={index} dangerouslySetInnerHTML={{ __html: paragraph }} />
80+
<StyledParagraph key={index}>{processNewLineInParagraph(paragraph)}</StyledParagraph>
7281
))}
7382
</ParagraphsContainer>
7483
{links && links.length > 0 && toggleSubMiniGuide ? (

0 commit comments

Comments
 (0)