fix(web): vocab form-level error states, newVocabulary heading, id guard, EN-required test
This commit is contained in:
@@ -27,6 +27,7 @@ export function VocabularyList() {
|
||||
return (
|
||||
<div className="flex h-full flex-col">
|
||||
<form onSubmit={onCreate} className="space-y-1 border-b p-3">
|
||||
<div className="text-sm font-medium">{t("vocab.newVocabulary")}</div>
|
||||
<Label htmlFor="vocab-key">{t("vocab.key")}</Label>
|
||||
<div className="flex gap-2">
|
||||
<Input
|
||||
@@ -38,6 +39,11 @@ export function VocabularyList() {
|
||||
{t("vocab.create")}
|
||||
</Button>
|
||||
</div>
|
||||
{create.isError && (
|
||||
<p role="alert" className="text-xs text-red-600">
|
||||
{t("form.rejected")}
|
||||
</p>
|
||||
)}
|
||||
</form>
|
||||
<ul className="flex-1 overflow-auto">
|
||||
{isLoading && (
|
||||
|
||||
Reference in New Issue
Block a user