refactor(react/ribbon): solve type errors

This commit is contained in:
Elian Doran
2025-08-24 20:23:00 +03:00
parent 88c3cd5cdd
commit 096ab52216
5 changed files with 17 additions and 14 deletions

View File

@@ -27,10 +27,14 @@ export default function CollectionPropertiesTab({ note }: TabContext) {
const viewTypeWithDefault = viewType ?? "grid";
const properties = bookPropertiesConfig[viewTypeWithDefault].properties;
return (note &&
return (
<div className="book-properties-widget">
<CollectionTypeSwitcher viewType={viewTypeWithDefault} setViewType={setViewType} />
<BookProperties note={note} properties={properties} />
{note && (
<>
<CollectionTypeSwitcher viewType={viewTypeWithDefault} setViewType={setViewType} />
<BookProperties note={note} properties={properties} />
</>
)}
</div>
);
}