diff --git a/libs/remix-ui/drag-n-drop/src/lib/remix-ui-drag-n-drop.tsx b/libs/remix-ui/drag-n-drop/src/lib/remix-ui-drag-n-drop.tsx index 9e5d4a8152..8046c1358c 100644 --- a/libs/remix-ui/drag-n-drop/src/lib/remix-ui-drag-n-drop.tsx +++ b/libs/remix-ui/drag-n-drop/src/lib/remix-ui-drag-n-drop.tsx @@ -1,4 +1,3 @@ -import { FileType } from "libs/remix-ui/workspace/src/lib/types"; import React, { createContext, ReactNode, @@ -7,6 +6,15 @@ import React, { useState, } from "react"; + +export interface FileType { + path: string, + name: string, + isDirectory: boolean, + type: 'folder' | 'file' | 'gist', + child?: File[] +} + interface MoveContextType { dragged: string; isDraggable?: boolean; diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx index 40d81e1252..bd11d75fb5 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx @@ -10,7 +10,7 @@ import '../css/file-explorer.css' import { checkSpecialChars, extractNameFromKey, extractParentFromKey, joinPath } from '@remix-ui/helper' // eslint-disable-next-line @typescript-eslint/no-unused-vars import { FileRender } from './file-render' -import {Drag} from "@remix-ui/drag-n-drop" +import { Drag } from "@remix-ui/drag-n-drop" export const FileExplorer = (props: FileExplorerProps) => { const { name, contextMenuItems, removedContextMenuItems, files, fileState } = props @@ -37,7 +37,6 @@ export const FileExplorer = (props: FileExplorerProps) => { }) const [canPaste, setCanPaste] = useState(false) const treeRef = useRef(null) - const [dragged, setDragged] = useState("") useEffect(() => { if (contextMenuItems) { diff --git a/libs/remix-ui/workspace/src/lib/components/file-render.tsx b/libs/remix-ui/workspace/src/lib/components/file-render.tsx index 8b601582eb..814715ee42 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-render.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-render.tsx @@ -82,7 +82,9 @@ export const FileRender = (props: RenderFileProps) => { iconX='pr-3 fa fa-folder' iconY='pr-3 fa fa-folder-open' key={`${file.path + props.index}`} - label={} + label={ + + } onClick={handleFolderClick} onContextMenu={handleContextMenu} labelClass={labelClass}