11import React , { useMemo } from "react" ;
22import styled , { css } from "styled-components" ;
33
4- import Identicon from "react-identicons" ;
54import ReactMarkdown from "react-markdown" ;
65import { useParams } from "react-router-dom" ;
76
@@ -11,7 +10,6 @@ import AttachmentIcon from "svgs/icons/attachment.svg";
1110
1211import { formatDate } from "utils/date" ;
1312import { getIpfsUrl } from "utils/getIpfsUrl" ;
14- import { shortenAddress } from "utils/shortenAddress" ;
1513
1614import { type Evidence } from "src/graphql/graphql" ;
1715import { getTxnExplorerLink } from "src/utils" ;
@@ -22,6 +20,7 @@ import { responsiveSize } from "styles/responsiveSize";
2220
2321import { ExternalLink } from "./ExternalLink" ;
2422import { InternalLink } from "./InternalLink" ;
23+ import JurorTitle from "pages/Home/TopJurors/JurorCard/JurorTitle" ;
2524
2625const StyledCard = styled ( Card ) `
2726 width: 100%;
@@ -100,15 +99,12 @@ const BottomShade = styled.div`
10099` ;
101100
102101const BottomLeftContent = styled . div `
103- display: block;
104-
105- & > *:not(:last-child) {
106- margin-bottom: 8px;
107- }
102+ display: flex;
103+ gap: 8px;
104+ flex-direction: column;
108105
109106 ${ landscapeStyle (
110107 ( ) => css `
111- display: flex;
112108 flex-direction: row;
113109 align-items: center;
114110 justify-content: center;
@@ -121,24 +117,6 @@ const BottomLeftContent = styled.div`
121117 ) }
122118` ;
123119
124- const AccountContainer = styled . div `
125- display: flex;
126- flex-direction: row;
127- gap: 8px;
128- align-items: center;
129-
130- canvas {
131- width: 24px;
132- height: 24px;
133- }
134-
135- > * {
136- flex-basis: 1;
137- flex-shrink: 0;
138- margin: 0;
139- }
140- ` ;
141-
142120const ExternalLinkHoverStyle = css `
143121 :hover {
144122 text-decoration: underline;
@@ -154,14 +132,6 @@ const ExternalLinkHoverStyle = css`
154132 }
155133` ;
156134
157- const Address = styled . p `
158- margin: 0;
159-
160- :hover {
161- color: ${ ( { theme } ) => theme . secondaryBlue } ;
162- }
163- ` ;
164-
165135const StyledExternalLink = styled ( ExternalLink ) `
166136 ${ ExternalLinkHoverStyle }
167137` ;
@@ -201,6 +171,23 @@ const FileLinkContainer = styled.div`
201171 margin-left: auto;
202172` ;
203173
174+ const StyledJurorInternalLink = styled ( InternalLink ) `
175+ label {
176+ color: ${ ( { theme } ) => theme . primaryText } ;
177+ }
178+
179+ :hover {
180+ label {
181+ cursor: pointer;
182+ color: ${ ( { theme } ) => theme . secondaryBlue } ;
183+ }
184+ }
185+
186+ svg {
187+ display: none;
188+ }
189+ ` ;
190+
204191const AttachedFileText : React . FC = ( ) => (
205192 < >
206193 < DesktopText > View attached file</ DesktopText >
@@ -248,12 +235,9 @@ const EvidenceCard: React.FC<IEvidenceCard> = ({
248235 </ TopContent >
249236 < BottomShade >
250237 < BottomLeftContent >
251- < AccountContainer >
252- < Identicon size = "24" string = { sender } />
253- < InternalLink to = { profileLink } >
254- < Address > { shortenAddress ( sender ) } </ Address >
255- </ InternalLink >
256- </ AccountContainer >
238+ < StyledJurorInternalLink to = { profileLink } >
239+ < JurorTitle address = { sender } />
240+ </ StyledJurorInternalLink >
257241 < StyledExternalLink to = { transactionExplorerLink } rel = "noopener noreferrer" target = "_blank" >
258242 < label > { formatDate ( Number ( timestamp ) , true ) } </ label >
259243 </ StyledExternalLink >
0 commit comments