aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/reviewDB/components/ReviewComponent.tsx
diff options
context:
space:
mode:
authorManti <67705577+mantikafasi@users.noreply.github.com>2023-05-14 02:29:13 +0300
committerGitHub <noreply@github.com>2023-05-14 01:29:13 +0200
commit7a27de892767aa8d9104ef16fe5ba2a2a75568cf (patch)
tree1602ecfb2e134e9c6c8ec05325e5d17d093eac17 /src/plugins/reviewDB/components/ReviewComponent.tsx
parent1bc06784226ed93b33698000cab70d17cb22639b (diff)
downloadVencord-7a27de892767aa8d9104ef16fe5ba2a2a75568cf.tar.gz
Vencord-7a27de892767aa8d9104ef16fe5ba2a2a75568cf.tar.bz2
Vencord-7a27de892767aa8d9104ef16fe5ba2a2a75568cf.zip
[ReviewDB] Improve UI & Use new RewviewDB api endpoints (#1104)
Diffstat (limited to 'src/plugins/reviewDB/components/ReviewComponent.tsx')
-rw-r--r--src/plugins/reviewDB/components/ReviewComponent.tsx22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/plugins/reviewDB/components/ReviewComponent.tsx b/src/plugins/reviewDB/components/ReviewComponent.tsx
index 04973d7..ac09b4c 100644
--- a/src/plugins/reviewDB/components/ReviewComponent.tsx
+++ b/src/plugins/reviewDB/components/ReviewComponent.tsx
@@ -34,19 +34,17 @@ export default LazyComponent(() => {
const [
{ cozyMessage, buttons, message, groupStart },
{ container, isHeader },
- { avatar, clickable, username, messageContent, wrapper, cozy, timestampInline, timestamp },
- { contents },
+ { avatar, clickable, username, messageContent, wrapper, cozy },
buttonClasses,
- { defaultColor }
] = findBulk(
p("cozyMessage"),
p("container", "isHeader"),
p("avatar", "zalgo"),
- p("contents"),
p("button", "wrapper", "selected"),
- p("defaultColor")
);
+ const dateFormat = new Intl.DateTimeFormat();
+
return function ReviewComponent({ review, refetch }: { review: Review; refetch(): void; }) {
function openModal() {
openUserProfileModal(review.sender.discordID);
@@ -89,7 +87,7 @@ export default LazyComponent(() => {
}
}>
- <div className={contents} style={{ paddingLeft: "0px" }}>
+ <div>
<img
className={classes(avatar, clickable)}
onClick={openModal}
@@ -107,16 +105,14 @@ export default LazyComponent(() => {
{
!Settings.plugins.ReviewDB.hideTimestamps && (
- <Timestamp
- timestamp={moment(review.timestamp * 1000)}
- compact={true}
- />
- )
+ <Timestamp timestamp={moment(review.timestamp * 1000)} >
+ {dateFormat.format(review.timestamp * 1000)}
+ </Timestamp>)
}
<p
- className={classes(messageContent, defaultColor)}
- style={{ fontSize: 15, marginTop: 4 }}
+ className={classes(messageContent)}
+ style={{ fontSize: 15, marginTop: 4, color: "var(--text-normal)" }}
>
{review.comment}
</p>