From fd17a41b297f28671407f3e63bf2238764b57033 Mon Sep 17 00:00:00 2001 From: marino <102478601+kemuru@users.noreply.github.com> Date: Wed, 5 Jul 2023 14:25:49 +0100 Subject: [PATCH] refactor(web): jazzicons to identicons --- web/package.json | 1 - web/src/components/EvidenceCard.tsx | 10 +++------- .../CaseDetails/Voting/VotingHistory.tsx | 4 ++-- yarn.lock | 20 ------------------- 4 files changed, 5 insertions(+), 30 deletions(-) diff --git a/web/package.json b/web/package.json index 36833b581..bc860c112 100644 --- a/web/package.json +++ b/web/package.json @@ -84,7 +84,6 @@ "react-error-boundary": "^3.1.4", "react-identicons": "^1.2.5", "react-is": "^18.2.0", - "react-jazzicon": "^1.0.4", "react-loading-skeleton": "^3.3.1", "react-markdown": "^8.0.7", "react-modal": "^3.16.1", diff --git a/web/src/components/EvidenceCard.tsx b/web/src/components/EvidenceCard.tsx index 405f141c2..e2078953b 100644 --- a/web/src/components/EvidenceCard.tsx +++ b/web/src/components/EvidenceCard.tsx @@ -1,6 +1,6 @@ import React from "react"; import styled from "styled-components"; -import Jazzicon, { jsNumberForAddress } from "react-jazzicon"; +import Identicon from "react-identicons"; import { Card } from "@kleros/ui-components-library"; import AttachmentIcon from "svgs/icons/attachment.svg"; import { useIPFSQuery } from "hooks/useIPFSQuery"; @@ -28,14 +28,10 @@ const EvidenceCard: React.FC = ({ evidence, sender, index }) => { )} - +

{shortenAddress(sender)}

{data && typeof data.fileURI !== "undefined" && ( - + )} diff --git a/web/src/pages/Cases/CaseDetails/Voting/VotingHistory.tsx b/web/src/pages/Cases/CaseDetails/Voting/VotingHistory.tsx index 7ed3c1013..722be49e7 100644 --- a/web/src/pages/Cases/CaseDetails/Voting/VotingHistory.tsx +++ b/web/src/pages/Cases/CaseDetails/Voting/VotingHistory.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import styled from "styled-components"; import { useParams } from "react-router-dom"; -import Jazzicon, { jsNumberForAddress } from "react-jazzicon"; +import Identicon from "react-identicons"; import { Tabs, Accordion, Box } from "@kleros/ui-components-library"; import BalanceIcon from "svgs/icons/law-balance.svg"; import { useVotingHistory } from "queries/useVotingHistory"; @@ -118,7 +118,7 @@ const VotingHistory: React.FC<{ arbitrable?: `0x${string}` }> = ({ arbitrable }) items={ localRounds.at(currentTab)?.votes.map((vote) => ({ title: shortenAddress(vote.juror.id), - icon: , + icon: , body: ( =17.0.0" - react-dom: ">=17.0.0" - checksum: e975b143b001f6e06bf6269498749e174550a86dfd85c255c64750f2adfa0b94d5ac8d79e04eb8b136f94067ee30ce47dae06312f9f1d37219319dc2c658d671 - languageName: node - linkType: hard - "react-lifecycles-compat@npm:^3.0.0": version: 3.0.4 resolution: "react-lifecycles-compat@npm:3.0.4"