diff --git a/web/src/authorities/authorities-page.tsx b/web/src/authorities/authorities-page.tsx index 1ce4268..97e18a3 100644 --- a/web/src/authorities/authorities-page.tsx +++ b/web/src/authorities/authorities-page.tsx @@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next"; import type { components } from "../api/schema"; import { useAuthorities, useCreateAuthority } from "../api/queries"; import { LabelEditor } from "../components/label-editor"; +import { MutationError } from "../components/mutation-error"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; @@ -141,11 +142,7 @@ export function AuthoritiesPage() {

)} - {create.isError && ( -

- {t("form.rejected")} -

- )} + - {create.isError && ( -

- {t("form.rejected")} -

- )} +
setEditingId(null)}> {t("form.cancel")} - {renameVocabulary.isError && ( -

- {t("form.rejected")} -

- )} + ) : ( <> diff --git a/web/src/vocab/vocabulary-terms.tsx b/web/src/vocab/vocabulary-terms.tsx index 3707f29..d31cc32 100644 --- a/web/src/vocab/vocabulary-terms.tsx +++ b/web/src/vocab/vocabulary-terms.tsx @@ -8,6 +8,7 @@ import { byLabel } from "../lib/sort"; import { labelText } from "../lib/labels"; import { useBreadcrumb } from "../shell/use-breadcrumb"; import { LabelEditor } from "../components/label-editor"; +import { MutationError } from "../components/mutation-error"; import { TermRow } from "./term-row"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; @@ -116,11 +117,7 @@ export function VocabularyTerms() { {t("form.required")}

)} - {addTerm.isError && ( -

- {t("form.rejected")} -

- )} +