diff --git a/web/src/fields/field-list.tsx b/web/src/fields/field-list.tsx
index 2c43168..b0eb8b1 100644
--- a/web/src/fields/field-list.tsx
+++ b/web/src/fields/field-list.tsx
@@ -4,7 +4,7 @@ import type { components } from "../api/schema";
import { useFieldDefinitions, useDeleteFieldDefinition } from "../api/queries";
import { labelText } from "../lib/labels";
import { DeleteConfirmDialog } from "../components/delete-confirm-dialog";
-import { Skeleton } from "@/components/ui/skeleton";
+import { ListSkeleton } from "@/components/ui/skeletons";
type FieldDefinitionView = components["schemas"]["FieldDefinitionView"];
@@ -20,15 +20,7 @@ export function FieldList({
const deleteField = useDeleteFieldDefinition();
const lang = i18n.language.startsWith("sv") ? "sv" : "en";
- if (isLoading) {
- return (
-
- {Array.from({ length: 6 }).map((_, i) => (
-
- ))}
-
- );
- }
+ if (isLoading) return
;
if (isError) return
{t("fields.loadError")}
;
if (!data || data.length === 0)
diff --git a/web/src/objects/object-edit-form.tsx b/web/src/objects/object-edit-form.tsx
index c1eeecd..0677ac1 100644
--- a/web/src/objects/object-edit-form.tsx
+++ b/web/src/objects/object-edit-form.tsx
@@ -6,6 +6,7 @@ import type { components } from "../api/schema";
import { useObject, useUpdateObject, useSetFields, FieldRejection } from "../api/queries";
import { useBreadcrumb } from "../shell/use-breadcrumb";
import { ObjectForm, type ObjectCore, type ObjectFormValues } from "./object-form";
+import { FormSkeleton } from "@/components/ui/skeletons";
type AdminObjectView = components["schemas"]["AdminObjectView"];
@@ -15,7 +16,7 @@ export function ObjectEditForm() {
const { data: object, isLoading } = useObject(id!);
- if (isLoading) return
;
+ if (isLoading) return
;
if (!object) return
{t("objects.notFound")}
;
diff --git a/web/src/search/search-panel.tsx b/web/src/search/search-panel.tsx
index b599862..b814e69 100644
--- a/web/src/search/search-panel.tsx
+++ b/web/src/search/search-panel.tsx
@@ -7,7 +7,7 @@ import { useDebouncedValue } from "../lib/use-debounced-value";
import { SearchResultRow } from "./search-result-row";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
-import { Skeleton } from "@/components/ui/skeleton";
+import { ListSkeleton } from "@/components/ui/skeletons";
const VIS = ["all", "draft", "internal", "public"] as const;
@@ -84,11 +84,7 @@ export function SearchPanel() {
{!hasQuery &&
{t("search.prompt")}
}
{hasQuery && search.isLoading && (
-
- {Array.from({ length: 5 }).map((_, i) => (
-
- ))}
-
+
)}
{hasQuery && search.isError && (
diff --git a/web/src/vocab/vocabulary-list.tsx b/web/src/vocab/vocabulary-list.tsx
index 53cae92..86169f1 100644
--- a/web/src/vocab/vocabulary-list.tsx
+++ b/web/src/vocab/vocabulary-list.tsx
@@ -7,6 +7,7 @@ import { DeleteConfirmDialog } from "../components/delete-confirm-dialog";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
+import { ListSkeleton } from "@/components/ui/skeletons";
export function VocabularyList() {
const { t } = useTranslation();
@@ -50,17 +51,17 @@ export function VocabularyList() {
)}
-
- {isLoading && (
- - …
- )}
- {isError && (
- - {t("vocab.loadError")}
- )}
- {data?.length === 0 && (
- - {t("vocab.empty")}
- )}
- {data?.map((v) => (
+ {isLoading ? (
+
+ ) : (
+
+ {isError && (
+ - {t("vocab.loadError")}
+ )}
+ {data?.length === 0 && (
+ - {t("vocab.empty")}
+ )}
+ {data?.map((v) => (
-
{editingId === v.id ? (
)}
- ))}
-
+ ))}
+
+ )}
);
}
diff --git a/web/src/vocab/vocabulary-terms.tsx b/web/src/vocab/vocabulary-terms.tsx
index dde518f..ed80fe2 100644
--- a/web/src/vocab/vocabulary-terms.tsx
+++ b/web/src/vocab/vocabulary-terms.tsx
@@ -10,6 +10,7 @@ import { TermRow } from "./term-row";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
+import { ListSkeleton } from "@/components/ui/skeletons";
type LabelInput = components["schemas"]["LabelInput"];
@@ -62,20 +63,21 @@ export function VocabularyTerms() {