mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-19 03:17:02 -04:00
forked!!
This commit is contained in:
parent
538b87062a
commit
ea7451bcdc
326 changed files with 24876 additions and 2280 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue