Skip to content

Commit fec1e7b

Browse files
committed
fix: add missing handleDownload function and downloadFile destructuring in sidebar
1 parent 662749a commit fec1e7b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/sidebar.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ function FileTreeNode({ node, fileSystem, depth }: FileTreeNodeProps) {
113113
}
114114
};
115115

116+
const handleDownload = (e: React.MouseEvent) => {
117+
e.stopPropagation();
118+
downloadFile(node.id);
119+
};
120+
116121
const handleAddFile = (e: React.MouseEvent) => {
117122
e.stopPropagation();
118123
const name = prompt("Enter file name:", "Untitled.md");

0 commit comments

Comments
 (0)