Split large contexts

This commit is contained in:
2024-10-04 23:09:40 +02:00
parent 654d35ad40
commit 50b0fbb03c
20 changed files with 183 additions and 87 deletions

View File

@@ -2,11 +2,11 @@
import { useCallback } from 'react';
import { useToasts } from '@geist-ui/core';
import { lookupFileByName } from '../services/api';
import { useFileContentContext } from '../contexts/FileContentContext';
import { useFileSelection } from '../contexts/FileSelectionContext';
export const useFileNavigation = () => {
const { setToast } = useToasts();
const { handleFileSelect } = useFileContentContext();
const { handleFileSelect } = useFileSelection();
const handleLinkClick = useCallback(
async (filename) => {