23 lines
768 B
TypeScript
23 lines
768 B
TypeScript
import { useState } from 'react';
|
|
import { FileTree } from './components/FileTree';
|
|
import { FileBrowser } from './components/FileBrowser';
|
|
import { FileOperations } from './components/FileOperations';
|
|
|
|
export function DriveScreen() {
|
|
const [currentPath, setCurrentPath] = useState('');
|
|
const [refreshKey, setRefreshKey] = useState(0);
|
|
|
|
const handleRefresh = () => {
|
|
setRefreshKey(prev => prev + 1);
|
|
};
|
|
|
|
return (
|
|
<div className="flex h-screen bg-white">
|
|
<FileTree onSelect={setCurrentPath} />
|
|
<div className="flex-1 flex flex-col overflow-hidden">
|
|
<FileBrowser key={`${currentPath}-${refreshKey}`} path={currentPath} />
|
|
<FileOperations currentPath={currentPath} onRefresh={handleRefresh} />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|