aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/reviewDB/components
diff options
context:
space:
mode:
authornick <69434290+lelboatz@users.noreply.github.com>2023-02-17 21:35:51 -0500
committerGitHub <noreply@github.com>2023-02-18 03:35:51 +0100
commit77c691651e72ba1569666d560f96af04bfde9a4e (patch)
treeb1e0a8b416680a0fde0788bb1195c5eef52101ac /src/plugins/reviewDB/components
parente14ec96e214f60058155560717b01a553f58c2c1 (diff)
downloadVencord-77c691651e72ba1569666d560f96af04bfde9a4e.tar.gz
Vencord-77c691651e72ba1569666d560f96af04bfde9a4e.tar.bz2
Vencord-77c691651e72ba1569666d560f96af04bfde9a4e.zip
ReviewDB: Show edit instead of create review where applicable (#466)
Co-authored-by: Ven <vendicated@riseup.net>
Diffstat (limited to 'src/plugins/reviewDB/components')
-rw-r--r--src/plugins/reviewDB/components/ReviewsView.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/reviewDB/components/ReviewsView.tsx b/src/plugins/reviewDB/components/ReviewsView.tsx
index 4852967..c62065f 100644
--- a/src/plugins/reviewDB/components/ReviewsView.tsx
+++ b/src/plugins/reviewDB/components/ReviewsView.tsx
@@ -32,6 +32,7 @@ export default function ReviewsView({ userId }: { userId: string; }) {
fallbackValue: [],
deps: [refetchCount],
});
+ const username = UserStore.getUser(userId)?.username ?? "";
const dirtyRefetch = () => setRefetchCount(refetchCount + 1);
@@ -79,7 +80,7 @@ export default function ReviewsView({ userId }: { userId: string; }) {
<textarea
className={classes(Classes.textarea.replace("textarea", ""), "enter-comment")}
// this produces something like '-_59yqs ...' but since no class exists with that name its fine
- placeholder={"Review @" + UserStore.getUser(userId)?.username ?? ""}
+ placeholder={reviews?.some(r => r.senderdiscordid === UserStore.getCurrentUser().id) ? `Update review for @${username}` : `Review @${username}`}
onKeyDown={onKeyPress}
style={{
marginTop: "6px",