1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-06 22:20:06 +00:00

feat(web): added delete option in Drive

This commit is contained in:
Saad Jutt
2022-03-14 06:26:12 +05:00
parent 67d200d817
commit 7a6e6c8bec
2 changed files with 37 additions and 9 deletions

View File

@@ -64,14 +64,16 @@ const SideBar = (props: any) => {
}, [setFilePathOnMount])
const handleSelect = (node: TreeNode) => {
if (!node.children.length) {
window.history.pushState(
'',
'',
`${baseUrl}/#/SASjsDrive?filePath=${node.relativePath}`
)
setSelectedFilePath(node.relativePath)
}
if (node.children.length) return
if (!node.name.includes('.')) return
window.history.pushState(
'',
'',
`${baseUrl}/#/SASjsDrive?filePath=${node.relativePath}`
)
setSelectedFilePath(node.relativePath)
}
const renderTree = (nodes: TreeNode) => (