Skip to content

Commit e786dda

Browse files
committed
fix(web): Font colour change, used function already defined
1 parent d35fe08 commit e786dda

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

web/src/components/EvidenceCard.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import AttachmentIcon from "svgs/icons/attachment.svg";
1111
import { useIPFSQuery } from "hooks/useIPFSQuery";
1212
import { getIpfsUrl } from "utils/getIpfsUrl";
1313
import { shortenAddress } from "utils/shortenAddress";
14+
import { formatDate } from "~src/utils/date";
1415

1516
import { landscapeStyle } from "styles/landscapeStyle";
1617
import { responsiveSize } from "styles/responsiveSize";
@@ -40,6 +41,9 @@ const StyledReactMarkdown = styled(ReactMarkdown)`
4041
a {
4142
font-size: 16px;
4243
}
44+
code {
45+
color: ${({ theme }) => theme.secondaryText};
46+
}
4347
`;
4448

4549
const BottomShade = styled.div`
@@ -61,13 +65,13 @@ const StyledA = styled.a`
6165
margin-left: auto;
6266
gap: ${responsiveSize(5, 6)};
6367
${landscapeStyle(
64-
() => css`
68+
() => css`
6569
> svg {
6670
width: 16px;
6771
fill: ${({ theme }) => theme.primaryBlue};
6872
}
6973
`
70-
)}
74+
)}
7175
`;
7276

7377
const AccountContainer = styled.div`
@@ -91,22 +95,22 @@ const AccountContainer = styled.div`
9195
const DesktopText = styled.span`
9296
display: none;
9397
${landscapeStyle(
94-
() => css`
98+
() => css`
9599
display: inline;
96100
`
97-
)}
101+
)}
98102
`;
99103

100104
const Timestamp = styled.p`
101-
color: #BECCE5;
105+
color: ${({ theme }) => theme.secondaryText};
102106
`;
103107

104108
const MobileText = styled.span`
105109
${landscapeStyle(
106-
() => css`
110+
() => css`
107111
display: none;
108112
`
109-
)}
113+
)}
110114
`;
111115

112116
const AttachedFileText: React.FC = () => (
@@ -143,11 +147,7 @@ const EvidenceCard: React.FC<IEvidenceCard> = ({ evidence, sender, index, timest
143147
<Identicon size="24" string={sender} />
144148
<p>{shortenAddress(sender)}</p>
145149
</AccountContainer>
146-
<Timestamp>{new Date(parseInt(timestamp) * 1000).toLocaleDateString('en-US', {
147-
year: 'numeric',
148-
month: 'long',
149-
day: 'numeric',
150-
})}</Timestamp>
150+
<Timestamp>{formatDate(Number(timestamp))}</Timestamp>
151151
{data && typeof data.fileURI !== "undefined" && (
152152
<StyledA href={getIpfsUrl(data.fileURI)} target="_blank" rel="noreferrer">
153153
<AttachmentIcon />

0 commit comments

Comments
 (0)