@@ -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 ) } ;
@@ -60,13 +65,13 @@ const StyledA = styled.a`
60
65
margin-left: auto;
61
66
gap: ${ responsiveSize ( 5 , 6 ) } ;
62
67
${ landscapeStyle (
63
- ( ) => css `
68
+ ( ) => css `
64
69
> svg {
65
70
width: 16px;
66
71
fill: ${ ( { theme } ) => theme . primaryBlue } ;
67
72
}
68
73
`
69
- ) }
74
+ ) }
70
75
` ;
71
76
72
77
const AccountContainer = styled . div `
@@ -90,18 +95,22 @@ const AccountContainer = styled.div`
90
95
const DesktopText = styled . span `
91
96
display: none;
92
97
${ landscapeStyle (
93
- ( ) => css `
98
+ ( ) => css `
94
99
display: inline;
95
100
`
96
- ) }
101
+ ) }
102
+ ` ;
103
+
104
+ const Timestamp = styled . p `
105
+ color: ${ ( { theme } ) => theme . secondaryText } ;
97
106
` ;
98
107
99
108
const MobileText = styled . span `
100
109
${ landscapeStyle (
101
- ( ) => css `
110
+ ( ) => css `
102
111
display: none;
103
112
`
104
- ) }
113
+ ) }
105
114
` ;
106
115
107
116
const AttachedFileText : React . FC = ( ) => (
@@ -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