| 331 | }; |
| 332 | |
| 333 | const navigateBack = () => { |
| 334 | if (pathHistory.length > 1) { |
| 335 | const newHistory = [...pathHistory]; |
| 336 | newHistory.pop(); // Remove current |
| 337 | const previousPath = newHistory[newHistory.length - 1]; |
| 338 | |
| 339 | // Don't go beyond the base path |
| 340 | if (previousPath.startsWith(basePath) || previousPath === basePath) { |
| 341 | setCurrentPath(previousPath); |
| 342 | setPathHistory(newHistory); |
| 343 | } |
| 344 | } |
| 345 | }; |
| 346 | |
| 347 | const handleEntryClick = (entry: FileEntry) => { |
| 348 | // Single click always selects (file or directory) |