Open source CapCut alternative.
TypeScript
fix(site): show the library's No items state only when it is truly empty
David Le527d3d74ac15
diff --git a/site/src/cut/components/SidePanel.tsx b/site/src/cut/components/SidePanel.tsxindex fc02d49a..792a3b89 100644--- a/site/src/cut/components/SidePanel.tsx+++ b/site/src/cut/components/SidePanel.tsx@@ -676,9 +676,13 @@ function LibraryPanel({ projectId }: { projectId: string }) {<Loader2 className="size-4 animate-spin" /></div>) : shown.length === 0 ? (- <div className="px-3.5 py-6 text-center text-xs text-muted-foreground">- {openFolder !== null ? "Empty folder" : "No items"}- </div>+ // At the root, filed-away assets, folders, and templates all count as+ // content — "No items" is only for a truly empty library.+ openFolder !== null ? (+ <div className="px-3.5 py-6 text-center text-xs text-muted-foreground">Empty folder</div>+ ) : all.length === 0 && folders.length === 0 && templates.length === 0 ? (+ <div className="px-3.5 py-6 text-center text-xs text-muted-foreground">No items</div>+ ) : null) : (<div className="grid min-h-0 flex-1 grid-cols-2 content-start gap-2.5 overflow-y-auto px-3.5 pb-3.5">{shown.map((a) => (@@ -751,7 +755,6 @@ function PublishPanel() {const count = combined.length;const [copiedAll, setCopiedAll] = useState(false);-return (<><PanelHead title="Details" />