circular dependency fixed

pull/2620/head
Seth Samuel 2 years ago
parent 4f9972e206
commit 14bd76ea98
  1. 10
      libs/remix-ui/drag-n-drop/src/lib/remix-ui-drag-n-drop.tsx
  2. 1
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx
  3. 4
      libs/remix-ui/workspace/src/lib/components/file-render.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;

@ -37,7 +37,6 @@ export const FileExplorer = (props: FileExplorerProps) => {
})
const [canPaste, setCanPaste] = useState(false)
const treeRef = useRef<HTMLDivElement>(null)
const [dragged, setDragged] = useState<string>("")
useEffect(() => {
if (contextMenuItems) {

@ -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={<FileLabel fileDecorations={props.fileDecorations} file={file} focusEdit={props.focusEdit} editModeOff={props.editModeOff} />}
label={<Draggable isDraggable={props.focusEdit.element!==null} file={file} expandedPath={props.expandPath} handleClickFolder={props.handleClickFolder}>
<FileLabel fileDecorations={props.fileDecorations} file={file} focusEdit={props.focusEdit} editModeOff={props.editModeOff} />
</Draggable>}
onClick={handleFolderClick}
onContextMenu={handleContextMenu}
labelClass={labelClass}

Loading…
Cancel
Save