fix(web): prevent click event from being stored as document title

The sidebar "+ Document" button was passing the click event to
onNewDocument, which stored a SyntheticEvent object as the title,
causing React error #31 when rendering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-18 10:14:03 -04:00
parent 0d38bd3108
commit 42d88fd7b4

View File

@@ -432,7 +432,7 @@ export function Sidebar({
{/* Footer */}
<div className="sidebar-footer">
<button className="sidebar-footer-btn" onClick={onNewDocument}>+ Document</button>
<button className="sidebar-footer-btn" onClick={() => onNewDocument()}>+ Document</button>
<button className="sidebar-footer-btn" onClick={onNewFolder}>+ Folder</button>
</div>