Show pending account invites and polish sign editor recovery
This commit is contained in:
@@ -6,6 +6,7 @@ import { useState } from "react";
|
||||
import { toast } from "sonner";
|
||||
import type { EventRole } from "@album/contracts";
|
||||
import { api } from "@/trpc/react";
|
||||
import { PendingInvites } from "@/components/pending-invites";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
@@ -56,7 +57,7 @@ export function EventPeople({
|
||||
onError: (error) => toast.error(error.message),
|
||||
});
|
||||
const invite = api.group.inviteEmail.useMutation({
|
||||
onSuccess: () => toast.success("Invite emailed"),
|
||||
onSuccess: async () => { toast.success("Invite emailed"); setEmail(""); await utils.group.pendingInvites.invalidate(); },
|
||||
onError: (error) => toast.error(error.message),
|
||||
});
|
||||
const event = api.manager.event.useQuery({ eventId });
|
||||
@@ -181,6 +182,7 @@ export function EventPeople({
|
||||
</Button>
|
||||
</form>
|
||||
) : null}
|
||||
{canManage && event.data?.groupId ? <PendingInvites groupId={event.data.groupId} eventId={eventId} /> : null}
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user