mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Remove more contexts
This commit is contained in:
@@ -3,7 +3,6 @@ import { fetchFileList } from '../services/api';
|
||||
|
||||
export const useFileList = (gitEnabled) => {
|
||||
const [files, setFiles] = useState([]);
|
||||
const [error, setError] = useState(null);
|
||||
|
||||
const loadFileList = useCallback(async () => {
|
||||
try {
|
||||
@@ -15,13 +14,12 @@ export const useFileList = (gitEnabled) => {
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to load file list:', error);
|
||||
setError('Failed to load file list. Please try again later.');
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
loadFileList();
|
||||
}, [loadFileList, gitEnabled]);
|
||||
}, [gitEnabled]);
|
||||
|
||||
return { files, error, loadFileList };
|
||||
return { files, loadFileList };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user