2025-04-02 20:42:47 -03:00
|
|
|
"use client";
|
2025-03-30 16:42:51 -03:00
|
|
|
import { useState } from 'react';
|
2025-03-30 19:28:28 -03:00
|
|
|
import { FileTree } from './components/FileTree';
|
|
|
|
import { FileBrowser } from './components/FileBrowser';
|
|
|
|
import { FileOperations } from './components/FileOperations';
|
2025-03-30 16:42:51 -03:00
|
|
|
|
2025-04-02 20:42:47 -03:00
|
|
|
export default function DriveScreen() {
|
2025-03-30 16:42:51 -03:00
|
|
|
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>
|
|
|
|
);
|
2025-03-30 19:28:28 -03:00
|
|
|
}
|