diff --git a/apps/web/src/app/(dashboard)/admin/waitlist/page.tsx b/apps/web/src/app/(dashboard)/admin/waitlist/page.tsx index 9bc859c..a18fcc7 100644 --- a/apps/web/src/app/(dashboard)/admin/waitlist/page.tsx +++ b/apps/web/src/app/(dashboard)/admin/waitlist/page.tsx @@ -78,6 +78,15 @@ export default function AdminWaitlistPage() { }, }); + const rejectWaitlist = api.admin.rejectWaitlistUser.useMutation({ + onSuccess: () => { + toast.success("Rejection email sent"); + }, + onError: (error) => { + toast.error(error.message ?? "Unable to send rejection email"); + }, + }); + const onSubmit = (values: SearchInput) => { setHasSearched(false); setUserResult(null); @@ -89,6 +98,11 @@ export default function AdminWaitlistPage() { updateWaitlist.mutate({ userId: userResult.id, isWaitlisted: checked }); }; + const handleReject = () => { + if (!userResult) return; + rejectWaitlist.mutate({ userId: userResult.id }); + }; + if (!isCloud()) { return (
Waitlist access
-- Toggle to control whether the user remains on the waitlist. -
+Waitlist access
++ Toggle to control whether the user remains on the waitlist. +
+Reject waitlist request
++ Send the applicant a rejection email without changing their waitlist status. +
+