1
1
import React , { useMemo } from "react" ;
2
2
import styled , { css } from "styled-components" ;
3
3
4
- import Identicon from "react-identicons" ;
5
4
import ReactMarkdown from "react-markdown" ;
6
5
import { useParams } from "react-router-dom" ;
7
6
@@ -11,7 +10,6 @@ import AttachmentIcon from "svgs/icons/attachment.svg";
11
10
12
11
import { formatDate } from "utils/date" ;
13
12
import { getIpfsUrl } from "utils/getIpfsUrl" ;
14
- import { shortenAddress } from "utils/shortenAddress" ;
15
13
16
14
import { type Evidence } from "src/graphql/graphql" ;
17
15
import { getTxnExplorerLink } from "src/utils" ;
@@ -22,6 +20,7 @@ import { responsiveSize } from "styles/responsiveSize";
22
20
23
21
import { ExternalLink } from "./ExternalLink" ;
24
22
import { InternalLink } from "./InternalLink" ;
23
+ import JurorTitle from "pages/Home/TopJurors/JurorCard/JurorTitle" ;
25
24
26
25
const StyledCard = styled ( Card ) `
27
26
width: 100%;
@@ -100,15 +99,12 @@ const BottomShade = styled.div`
100
99
` ;
101
100
102
101
const 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;
108
105
109
106
${ landscapeStyle (
110
107
( ) => css `
111
- display: flex;
112
108
flex-direction: row;
113
109
align-items: center;
114
110
justify-content: center;
@@ -121,24 +117,6 @@ const BottomLeftContent = styled.div`
121
117
) }
122
118
` ;
123
119
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
-
142
120
const ExternalLinkHoverStyle = css `
143
121
:hover {
144
122
text-decoration: underline;
@@ -154,14 +132,6 @@ const ExternalLinkHoverStyle = css`
154
132
}
155
133
` ;
156
134
157
- const Address = styled . p `
158
- margin: 0;
159
-
160
- :hover {
161
- color: ${ ( { theme } ) => theme . secondaryBlue } ;
162
- }
163
- ` ;
164
-
165
135
const StyledExternalLink = styled ( ExternalLink ) `
166
136
${ ExternalLinkHoverStyle }
167
137
` ;
@@ -201,6 +171,23 @@ const FileLinkContainer = styled.div`
201
171
margin-left: auto;
202
172
` ;
203
173
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
+
204
191
const AttachedFileText : React . FC = ( ) => (
205
192
< >
206
193
< DesktopText > View attached file</ DesktopText >
@@ -248,12 +235,9 @@ const EvidenceCard: React.FC<IEvidenceCard> = ({
248
235
</ TopContent >
249
236
< BottomShade >
250
237
< 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 >
257
241
< StyledExternalLink to = { transactionExplorerLink } rel = "noopener noreferrer" target = "_blank" >
258
242
< label > { formatDate ( Number ( timestamp ) , true ) } </ label >
259
243
</ StyledExternalLink >
0 commit comments