()
| 286 | ]; |
| 287 | |
| 288 | async function removeUser() { |
| 289 | if (selectedUser) { |
| 290 | const res = await api |
| 291 | .delete(`/org/${org!.org.orgId}/user/${selectedUser.id}`) |
| 292 | .catch((e) => { |
| 293 | toast({ |
| 294 | variant: "destructive", |
| 295 | title: t("userErrorOrgRemove"), |
| 296 | description: formatAxiosError( |
| 297 | e, |
| 298 | t("userErrorOrgRemoveDescription") |
| 299 | ) |
| 300 | }); |
| 301 | }); |
| 302 | |
| 303 | if (res && res.status === 200) { |
| 304 | toast({ |
| 305 | variant: "default", |
| 306 | title: t("userOrgRemoved"), |
| 307 | description: t("userOrgRemovedDescription", { |
| 308 | email: selectedUser.email || "" |
| 309 | }) |
| 310 | }); |
| 311 | } |
| 312 | } |
| 313 | router.refresh(); |
| 314 | setIsDeleteModalOpen(false); |
| 315 | } |
| 316 | |
| 317 | function toggleSort(column: string) { |
| 318 | const newSearch = getNextSortOrder(column, searchParams); |
nothing calls this directly
no test coverage detected