Skip to content

Commit 6e5113c

Browse files
committed
chore: remove hyphen if answer description does not exist
1 parent 8c2d861 commit 6e5113c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

web/src/components/DisputePreview/DisputeContext.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const DisputeContext: React.FC<IDisputeContext> = ({ disputeDetails, isRp
9191
<small>Option {i + 1}:</small>
9292
<label>
9393
{answer.title}
94-
{answer.description ? ` - ${answer.description}` : null}
94+
{answer.description.trim() ? ` - ${answer.description}` : null}
9595
</label>
9696
</Answer>
9797
))}

web/src/components/Verdict/Answer.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,23 @@ interface IAnswer {
2626
answer?: Answer;
2727
currentRuling: number;
2828
}
29+
2930
const AnswerDisplay: React.FC<IAnswer> = ({ answer, currentRuling }) => {
3031
return (
3132
<>
3233
{answer ? (
3334
<Container>
34-
<AnswerTitle>{answer.title} -</AnswerTitle>
35-
<AnswerDescription>{answer.description}</AnswerDescription>
35+
<AnswerTitle>
36+
{answer.title}
37+
{answer.description.trim() ? " -" : null}
38+
</AnswerTitle>
39+
<AnswerDescription>{answer.description.trim()}</AnswerDescription>
3640
</Container>
3741
) : (
3842
<Container>{currentRuling !== 0 ? <h3>Answer 0x{currentRuling}</h3> : <h3>Refuse to Arbitrate</h3>}</Container>
3943
)}
4044
</>
4145
);
4246
};
47+
4348
export default AnswerDisplay;

0 commit comments

Comments
 (0)