diff --git a/src/dummy.test.ts b/src/dummy.test.ts new file mode 100644 index 0000000..239caad --- /dev/null +++ b/src/dummy.test.ts @@ -0,0 +1,5 @@ +describe('dummy', () => { + it('should exit with one', () => { + expect(1).toBe(1); + }); +}); diff --git a/src/js/apps/Explorer/Explorer.tsx b/src/js/apps/Explorer/Explorer.tsx index aa04ce7..de36afd 100644 --- a/src/js/apps/Explorer/Explorer.tsx +++ b/src/js/apps/Explorer/Explorer.tsx @@ -10,13 +10,11 @@ import ListItemText from '@material-ui/core/ListItemText'; import Collapse from '@material-ui/core/Collapse'; import ExpandLess from '@material-ui/icons/ExpandLess'; import ExpandMore from '@material-ui/icons/ExpandMore'; -import Dirent from 'memfs/lib/Dirent'; import InstanceBag from '../../InstanceBag'; import Folder from './components/Folder'; import File from './components/File'; import AppHeader from '../../components/molecules/AppHeader'; import Dropzone from '../../components/molecules/Dropzone'; -import Kernel from '../../../vendor/kernel'; import BackgroundTerminal from '../../background/BackgroundTerminal'; import { getDirectoryListing, Listing } from '../../services/FileService'; diff --git a/src/js/apps/Explorer/components/Folder/Folder.tsx b/src/js/apps/Explorer/components/Folder/Folder.tsx index e5b7de9..2b768eb 100644 --- a/src/js/apps/Explorer/components/Folder/Folder.tsx +++ b/src/js/apps/Explorer/components/Folder/Folder.tsx @@ -14,19 +14,22 @@ interface Props { onClick: (folder: Listing) => void; } -export default function Folder(props: Props) { - const { folder } = props; +export default function Folder({ + folder, + path, + onClick, +}: Props) { const [icon, setIcon] = React.useState(''); const [name, setName] = React.useState(folder.name); React.useEffect(() => { async function processFile() { // This is a special folder with an "extension" - const folderName: any = props.folder.name; + const folderName: any = folder.name; const folderExtension = getFileExtension(folderName); if (folderExtension === WAPP_EXTENSION) { - const wappInfo = await getWappInformation(`${props.path}/${folderName}`); + const wappInfo = await getWappInformation(`${path}/${folderName}`); // We should read the wapp for an icon @@ -44,11 +47,12 @@ export default function Folder(props: Props) { } processFile(); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return (