) {
if (key === "Enter") {
addReview({
userid: userId,
comment: (target as HTMLInputElement).value,
star: -1
}).then(res => {
if (res?.success) {
(target as HTMLInputElement).value = ""; // clear the input
dirtyRefetch();
} else if (res?.message) {
showToast(res.message);
}
});
}
}
return (
User Reviews
{reviews?.map(review =>
)}
{reviews?.length === 0 && (
Looks like nobody reviewed this user yet. You could be the first!
)}
);
}