@@ -11,6 +11,7 @@ import AttachmentIcon from "svgs/icons/attachment.svg";
11
11
import { useIPFSQuery } from "hooks/useIPFSQuery" ;
12
12
import { getIpfsUrl } from "utils/getIpfsUrl" ;
13
13
import { shortenAddress } from "utils/shortenAddress" ;
14
+ import { formatDate } from "utils/date" ;
14
15
15
16
import { landscapeStyle } from "styles/landscapeStyle" ;
16
17
import { responsiveSize } from "styles/responsiveSize" ;
@@ -40,11 +41,15 @@ const StyledReactMarkdown = styled(ReactMarkdown)`
40
41
a {
41
42
font-size: 16px;
42
43
}
44
+ code {
45
+ color: ${ ( { theme } ) => theme . secondaryText } ;
46
+ }
43
47
` ;
44
48
45
49
const BottomShade = styled . div `
46
50
background-color: ${ ( { theme } ) => theme . lightBlue } ;
47
51
display: flex;
52
+ flex-wrap: wrap;
48
53
align-items: center;
49
54
gap: 16px;
50
55
padding: 12px ${ responsiveSize ( 8 , 24 ) } ;
@@ -96,6 +101,10 @@ const DesktopText = styled.span`
96
101
) }
97
102
` ;
98
103
104
+ const Timestamp = styled . p `
105
+ color: ${ ( { theme } ) => theme . secondaryText } ;
106
+ ` ;
107
+
99
108
const MobileText = styled . span `
100
109
${ landscapeStyle (
101
110
( ) => css `
@@ -115,9 +124,10 @@ interface IEvidenceCard {
115
124
evidence : string ;
116
125
sender : string ;
117
126
index : number ;
127
+ timestamp : string ;
118
128
}
119
129
120
- const EvidenceCard : React . FC < IEvidenceCard > = ( { evidence, sender, index } ) => {
130
+ const EvidenceCard : React . FC < IEvidenceCard > = ( { evidence, sender, index, timestamp } ) => {
121
131
const { data } = useIPFSQuery ( evidence ) ;
122
132
return (
123
133
< StyledCard >
@@ -137,6 +147,7 @@ const EvidenceCard: React.FC<IEvidenceCard> = ({ evidence, sender, index }) => {
137
147
< Identicon size = "24" string = { sender } />
138
148
< p > { shortenAddress ( sender ) } </ p >
139
149
</ AccountContainer >
150
+ < Timestamp > { formatDate ( Number ( timestamp ) ) } </ Timestamp >
140
151
{ data && typeof data . fileURI !== "undefined" && (
141
152
< StyledA href = { getIpfsUrl ( data . fileURI ) } target = "_blank" rel = "noreferrer" >
142
153
< AttachmentIcon />
0 commit comments