From 6e5113c5d3d4cd8fc76c8c62d3528eb37ff19cdc Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:18:56 +0100 Subject: [PATCH] chore: remove hyphen if answer description does not exist --- web/src/components/DisputePreview/DisputeContext.tsx | 2 +- web/src/components/Verdict/Answer.tsx | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/web/src/components/DisputePreview/DisputeContext.tsx b/web/src/components/DisputePreview/DisputeContext.tsx index 3b8cec7ab..12ce6a104 100644 --- a/web/src/components/DisputePreview/DisputeContext.tsx +++ b/web/src/components/DisputePreview/DisputeContext.tsx @@ -91,7 +91,7 @@ export const DisputeContext: React.FC = ({ disputeDetails, isRp Option {i + 1}: ))} diff --git a/web/src/components/Verdict/Answer.tsx b/web/src/components/Verdict/Answer.tsx index 0b5cb2681..7eb3553e0 100644 --- a/web/src/components/Verdict/Answer.tsx +++ b/web/src/components/Verdict/Answer.tsx @@ -26,13 +26,17 @@ interface IAnswer { answer?: Answer; currentRuling: number; } + const AnswerDisplay: React.FC = ({ answer, currentRuling }) => { return ( <> {answer ? ( - {answer.title} - - {answer.description} + + {answer.title} + {answer.description.trim() ? " -" : null} + + {answer.description.trim()} ) : ( {currentRuling !== 0 ?

Answer 0x{currentRuling}

:

Refuse to Arbitrate

}
@@ -40,4 +44,5 @@ const AnswerDisplay: React.FC = ({ answer, currentRuling }) => { ); }; + export default AnswerDisplay;