Skip to content

Commit

Permalink
replace api calls on verify page with removing from array
Browse files Browse the repository at this point in the history
  • Loading branch information
js0mmer committed Nov 6, 2024
1 parent 9482985 commit 9d65326
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site/src/component/Verify/Verify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ const Verify: FC = () => {

const verifyReview = async (reviewId: number) => {
await trpc.reviews.verify.mutate({ id: reviewId });
getUnverifiedReviews();
setReviews(reviews.filter((review) => review.id !== reviewId));
};

const deleteReview = async (reviewId: number) => {
await trpc.reviews.delete.mutate({ id: reviewId });
getUnverifiedReviews();
setReviews(reviews.filter((review) => review.id !== reviewId));
};

if (!loaded) {
Expand Down

0 comments on commit 9d65326

Please sign in to comment.