Skip to content

Commit 70f19ba

Browse files
authored
Merge pull request #70 from kleros/dependabot/npm_and_yarn/dev/kleros/kleros-sdk-2.2.0
chore(deps): bump @kleros/kleros-sdk from 2.1.10 to 2.2.0
2 parents 2631f4c + d6434aa commit 70f19ba

File tree

4 files changed

+344
-367
lines changed

4 files changed

+344
-367
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"prepare": "husky"
1313
},
1414
"dependencies": {
15-
"@kleros/kleros-sdk": "2.1.10",
15+
"@kleros/kleros-sdk": "2.3.1",
1616
"@radix-ui/react-dropdown-menu": "^2.1.2",
1717
"@radix-ui/react-separator": "^1.1.0",
1818
"class-variance-authority": "^0.7.1",

src/app/[locale]/case/[disputeId]/components/Question.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,17 @@ const Question: React.FC<IQuestion> = async ({ disputeId }) => {
8686
langDir === "rtl" && "divide-x-reverse",
8787
)}
8888
>
89-
{disputeDetails.answers.map((answer) => (
89+
{(disputeId === "51"
90+
? [
91+
{
92+
id: "0x0",
93+
title: "Si.",
94+
description: "Si compensar al usuario.",
95+
},
96+
...disputeDetails.answers.slice(1),
97+
]
98+
: disputeDetails.answers.slice(1)
99+
).map((answer) => (
90100
<div key={answer.title}>
91101
<div
92102
className={clsx(

src/app/utils.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,11 @@ type IRulingOptions = Record<string, DisputeDetails["answers"][number]>;
3838
export const getRulingOptions = (
3939
answers: DisputeDetails["answers"],
4040
): IRulingOptions =>
41-
answers.reduce(
42-
(acc: IRulingOptions, answer) => {
43-
const answerId = answer.id;
44-
if (answerId) acc[answerId] = answer;
45-
return acc;
46-
},
47-
{ "0x0": { title: "Refuse", description: "Refuse to arbitrate" } },
48-
);
41+
answers.reduce((acc: IRulingOptions, answer) => {
42+
const answerId = answer.id;
43+
if (answerId) acc[answerId] = answer;
44+
return acc;
45+
}, {});
4946

5047
export const processCurrentPeriod = (
5148
currentPeriod: number,

0 commit comments

Comments
 (0)