This commit is contained in:
thororen 2024-04-17 14:29:47 -04:00
parent 538b87062a
commit ea7451bcdc
326 changed files with 24876 additions and 2280 deletions

View file

@ -120,7 +120,7 @@ function ReviewList({ refetch, reviews, hideOwnReview, profileId }: { refetch():
}
export function ReviewsInputComponent({ discordId, isAuthor, refetch, name }: { discordId: string, name: string; isAuthor: boolean; refetch(): void; }) {
export function ReviewsInputComponent({ discordId, isAuthor, refetch, name, repliesTo }: { discordId: string, name: string; isAuthor: boolean; refetch(): void; repliesTo?: number; }) {
const { token } = Auth;
const editorRef = useRef<any>(null);
const inputType = ChatInputTypes.FORM;
@ -142,9 +142,10 @@ export function ReviewsInputComponent({ discordId, isAuthor, refetch, name }: {
placeholder={
!token
? "You need to authorize to review users!"
: isAuthor
? `Update review for @${name}`
: `Review @${name}`
: repliesTo ? `Reply to @${name}`
: isAuthor
? `Update review for @${name}`
: `Review @${name}`
}
type={inputType}
disableThemedBackground={true}
@ -152,9 +153,12 @@ export function ReviewsInputComponent({ discordId, isAuthor, refetch, name }: {
textValue=""
onSubmit={
async res => {
// I know this naming is deranged, but for compatibility it has to stay this way
const response = await addReview({
userid: discordId,
comment: res.value,
repliesto: repliesTo,
});
if (response) {