import { Suspense, useEffect, useRef } from 'react'; import { FiFileText, FiRefreshCw } from 'react-icons/fi'; import { useToggle } from '@react-hookz/web'; import { useDataContext } from '../providers/DataProvider'; import EntityList from './EntityList'; import styles from './Explorer.module.css'; import { EXPLORER_ID, focusLast, focusNext } from './utils'; import { indexOf } from 'lodash'; import HsdsProvider from '../providers/hsds/HsdsProvider'; import type { DataProviderApi } from '../../src/providers/api'; interface Props { selectedPath: string; fileIndex:number; onSelect: (path: string) => void; onSelectFile: (path: string) => void; onSelectFileIndex: (index:number) => void; } function SingleFile(props: Props) { const { selectedPath,fileIndex, onSelect, onSelectFile,onSelectFileIndex } = props; const { filename,filepath } = useDataContext(); console.log(filename) const ref = useRef(null); const btnRef = useRef(null); useEffect(() => { btnRef.current?.focus(); }, [btnRef]); return (
} >
); } export default SingleFile;