| 179 | const creating = AsyncResult.isWaiting(createState); |
| 180 | |
| 181 | const create = async () => { |
| 182 | const exit = await doCreate({ |
| 183 | payload: { role, label: label.trim() || undefined }, |
| 184 | reactivityKeys: inviteWriteKeys, |
| 185 | }); |
| 186 | if (Exit.isSuccess(exit)) { |
| 187 | setLabel(""); |
| 188 | setRole("member"); |
| 189 | toast.success("Invite link created"); |
| 190 | return; |
| 191 | } |
| 192 | toast.error("Failed to create invite"); |
| 193 | }; |
| 194 | |
| 195 | const revoke = async (inviteId: string) => { |
| 196 | const exit = await doRevoke({ params: { inviteId }, reactivityKeys: inviteWriteKeys }); |