Fix linter errors in LayoutDataProvider and AllSearchSpacesSheet

This commit is contained in:
CREDO23 2026-01-12 16:47:15 +02:00
parent b6ddc233db
commit 4a2f62be1f
2 changed files with 6 additions and 11 deletions

View file

@ -143,16 +143,11 @@ export function LayoutDataProvider({
})); }));
}, [searchSpacesData]); }, [searchSpacesData]);
// Use searchSpace query result for active search space (more reliable than finding in list) // Find active search space from list (has is_owner and member_count)
const activeSearchSpace: SearchSpace | null = searchSpace const activeSearchSpace: SearchSpace | null = useMemo(() => {
? { if (!searchSpaceId || !searchSpaces.length) return null;
id: searchSpace.id, return searchSpaces.find((s) => s.id === Number(searchSpaceId)) ?? null;
name: searchSpace.name, }, [searchSpaceId, searchSpaces]);
description: searchSpace.description,
isOwner: searchSpace.is_owner,
memberCount: searchSpace.member_count || 0,
}
: null;
// Transform chats // Transform chats
const chats: ChatItem[] = useMemo(() => { const chats: ChatItem[] = useMemo(() => {

View file

@ -217,7 +217,7 @@ export function AllSearchSpacesSheet({
<AlertDialogHeader> <AlertDialogHeader>
<AlertDialogTitle>{t("delete_title")}</AlertDialogTitle> <AlertDialogTitle>{t("delete_title")}</AlertDialogTitle>
<AlertDialogDescription> <AlertDialogDescription>
{t("delete_confirm", { name: spaceToDelete?.name })} {t("delete_confirm", { name: spaceToDelete?.name ?? "" })}
</AlertDialogDescription> </AlertDialogDescription>
</AlertDialogHeader> </AlertDialogHeader>
<AlertDialogFooter> <AlertDialogFooter>