From 56dafccd18e61e9ec5043aec5a83451c719e4d62 Mon Sep 17 00:00:00 2001 From: epiqueras Date: Wed, 23 Sep 2020 21:06:25 -0400 Subject: [PATCH] chore: fix submission details accordion --- README.md | 3 +- .../[id]/submission-details-accordion.js | 62 ++++++++++--------- 2 files changed, 36 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 5af6fc1b..fc9aa971 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## (2020-09-23) +## (2020-09-24) - chore: add code of conduct ([6859555](https://github.com/Proof-Of-Humanity/proof-of-humanity-web/commit/6859555)) - chore: add issue templates ([6adcbee](https://github.com/Proof-Of-Humanity/proof-of-humanity-web/commit/6adcbee)) @@ -17,6 +17,7 @@ - chore: fix ci and add security policy ([07dcc94](https://github.com/Proof-Of-Humanity/proof-of-humanity-web/commit/07dcc94)) - chore: fix routing bugs and finish registration form ([d789c7b](https://github.com/Proof-Of-Humanity/proof-of-humanity-web/commit/d789c7b)) - chore: fix subgraph memory access ([ba9cc9e](https://github.com/Proof-Of-Humanity/proof-of-humanity-web/commit/ba9cc9e)) +- chore: fix weird Web3 inconsistency ([5d205ad](https://github.com/Proof-Of-Humanity/proof-of-humanity-web/commit/5d205ad)) - chore: forward all props to svg in icons ([7507ab6](https://github.com/Proof-Of-Humanity/proof-of-humanity-web/commit/7507ab6)) - chore: framework work ([b7b7e62](https://github.com/Proof-Of-Humanity/proof-of-humanity-web/commit/b7b7e62)) - chore: implement accordions ([c8e1d07](https://github.com/Proof-Of-Humanity/proof-of-humanity-web/commit/c8e1d07)) diff --git a/_pages/profile/[id]/submission-details-accordion.js b/_pages/profile/[id]/submission-details-accordion.js index 6cc07509..629c6923 100644 --- a/_pages/profile/[id]/submission-details-accordion.js +++ b/_pages/profile/[id]/submission-details-accordion.js @@ -68,11 +68,13 @@ export default function SubmissionDetailsAccordion({ submission, contract }) { ], id, } = useFragment(submissionDetailsAccordionFragments.submission, submission); - const challenges = _challenges.map((challenge) => ({ - ...challenge, - reason: challengeReasonEnum.parse(challenge.reason), - parties: [requester, challenge.challenger], - })); + const challenges = _challenges + .map((challenge) => ({ + ...challenge, + reason: challengeReasonEnum.parse(challenge.reason), + parties: [requester, challenge.challenger], + })) + .filter(({ disputeID }) => disputeID !== null); const { sharedStakeMultiplier, winnerStakeMultiplier, @@ -92,31 +94,35 @@ export default function SubmissionDetailsAccordion({ submission, contract }) { /> } /> - 0 && ( + <> + + } /> - } - /> - + } /> - } - /> + + )} ); }