fix(web): authorities unknown-kind redirect, extract labelText util, EN-required test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,18 +8,9 @@ import { LabelEditor } from "../components/label-editor";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { labelText } from "../lib/labels";
|
||||
|
||||
type LabelInput = components["schemas"]["LabelInput"];
|
||||
type LabelView = components["schemas"]["LabelView"];
|
||||
|
||||
function labelText(labels: LabelView[], lang: string): string {
|
||||
return (
|
||||
labels.find((l) => l.lang === lang)?.label ??
|
||||
labels.find((l) => l.lang === "en")?.label ??
|
||||
labels[0]?.label ??
|
||||
""
|
||||
);
|
||||
}
|
||||
|
||||
export function VocabularyTerms() {
|
||||
const { t, i18n } = useTranslation();
|
||||
|
||||
Reference in New Issue
Block a user