@@ -11,6 +11,7 @@ import AttachmentIcon from "svgs/icons/attachment.svg";
1111import { useIPFSQuery } from "hooks/useIPFSQuery" ;
1212import { getIpfsUrl } from "utils/getIpfsUrl" ;
1313import { shortenAddress } from "utils/shortenAddress" ;
14+ import { formatDate } from "utils/date" ;
1415
1516import { landscapeStyle } from "styles/landscapeStyle" ;
1617import { responsiveSize } from "styles/responsiveSize" ;
@@ -40,11 +41,15 @@ const StyledReactMarkdown = styled(ReactMarkdown)`
4041 a {
4142 font-size: 16px;
4243 }
44+ code {
45+ color: ${ ( { theme } ) => theme . secondaryText } ;
46+ }
4347` ;
4448
4549const BottomShade = styled . div `
4650 background-color: ${ ( { theme } ) => theme . lightBlue } ;
4751 display: flex;
52+ flex-wrap: wrap;
4853 align-items: center;
4954 gap: 16px;
5055 padding: 12px ${ responsiveSize ( 8 , 24 ) } ;
@@ -60,13 +65,13 @@ const StyledA = styled.a`
6065 margin-left: auto;
6166 gap: ${ responsiveSize ( 5 , 6 ) } ;
6267 ${ landscapeStyle (
63- ( ) => css `
68+ ( ) => css `
6469 > svg {
6570 width: 16px;
6671 fill: ${ ( { theme } ) => theme . primaryBlue } ;
6772 }
6873 `
69- ) }
74+ ) }
7075` ;
7176
7277const AccountContainer = styled . div `
@@ -90,18 +95,22 @@ const AccountContainer = styled.div`
9095const DesktopText = styled . span `
9196 display: none;
9297 ${ landscapeStyle (
93- ( ) => css `
98+ ( ) => css `
9499 display: inline;
95100 `
96- ) }
101+ ) }
102+ ` ;
103+
104+ const Timestamp = styled . p `
105+ color: ${ ( { theme } ) => theme . secondaryText } ;
97106` ;
98107
99108const MobileText = styled . span `
100109 ${ landscapeStyle (
101- ( ) => css `
110+ ( ) => css `
102111 display: none;
103112 `
104- ) }
113+ ) }
105114` ;
106115
107116const AttachedFileText : React . FC = ( ) => (
@@ -115,9 +124,10 @@ interface IEvidenceCard {
115124 evidence : string ;
116125 sender : string ;
117126 index : number ;
127+ timestamp : string ;
118128}
119129
120- const EvidenceCard : React . FC < IEvidenceCard > = ( { evidence, sender, index } ) => {
130+ const EvidenceCard : React . FC < IEvidenceCard > = ( { evidence, sender, index, timestamp } ) => {
121131 const { data } = useIPFSQuery ( evidence ) ;
122132 return (
123133 < StyledCard >
@@ -137,6 +147,7 @@ const EvidenceCard: React.FC<IEvidenceCard> = ({ evidence, sender, index }) => {
137147 < Identicon size = "24" string = { sender } />
138148 < p > { shortenAddress ( sender ) } </ p >
139149 </ AccountContainer >
150+ < Timestamp > { formatDate ( Number ( timestamp ) ) } </ Timestamp >
140151 { data && typeof data . fileURI !== "undefined" && (
141152 < StyledA href = { getIpfsUrl ( data . fileURI ) } target = "_blank" rel = "noreferrer" >
142153 < AttachmentIcon />
0 commit comments