mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 16:04:23 +00:00
Split large contexts
This commit is contained in:
@@ -7,12 +7,14 @@ import ContentView from './ContentView';
|
||||
import CreateFileModal from './modals/CreateFileModal';
|
||||
import DeleteFileModal from './modals/DeleteFileModal';
|
||||
import CommitMessageModal from './modals/CommitMessageModal';
|
||||
import { useFileContentContext } from '../contexts/FileContentContext';
|
||||
import { useUIStateContext } from '../contexts/UIStateContext';
|
||||
import { useTabContext } from '../contexts/TabContext';
|
||||
import { useEditorContent } from '../contexts/EditorContentContext';
|
||||
import { useFileSelection } from '../contexts/FileSelectionContext';
|
||||
|
||||
const MainContent = () => {
|
||||
const { selectedFile, hasUnsavedChanges } = useFileContentContext();
|
||||
const { activeTab, setActiveTab } = useUIStateContext();
|
||||
const { hasUnsavedChanges } = useEditorContent();
|
||||
const { selectedFile } = useFileSelection();
|
||||
const { activeTab, setActiveTab } = useTabContext();
|
||||
|
||||
const handleTabChange = (value) => {
|
||||
setActiveTab(value);
|
||||
|
||||
Reference in New Issue
Block a user