mirror of
				https://github.com/cfngc4594/monaco-editor-lsp-next.git
				synced 2025-11-04 08:33:36 +00:00 
			
		
		
		
	chore(store): delete unused useProblemEditorStore.ts file
This commit is contained in:
		
							parent
							
								
									d2bafafc14
								
							
						
					
					
						commit
						7a29d751d3
					
				@ -1,26 +0,0 @@
 | 
			
		||||
import { create } from "zustand";
 | 
			
		||||
import { EditorLanguage } from "@prisma/client";
 | 
			
		||||
import { createJSONStorage, persist } from "zustand/middleware";
 | 
			
		||||
import { DEFAULT_EDITOR_LANGUAGE } from "@/config/editor-language";
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * State management for problem editor settings.
 | 
			
		||||
 */
 | 
			
		||||
interface ProblemEditorState {
 | 
			
		||||
  globalEditorLanguage: EditorLanguage;
 | 
			
		||||
  setGlobalEditorLanguage: (language: EditorLanguage) => void;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const useProblemEditorStore = create<ProblemEditorState>()(
 | 
			
		||||
  persist(
 | 
			
		||||
    (set) => ({
 | 
			
		||||
      globalEditorLanguage: DEFAULT_EDITOR_LANGUAGE,
 | 
			
		||||
      setGlobalEditorLanguage: (language) => set({ globalEditorLanguage: language }),
 | 
			
		||||
    }),
 | 
			
		||||
    {
 | 
			
		||||
      name: "problem-editor",
 | 
			
		||||
      storage: createJSONStorage(() => localStorage),
 | 
			
		||||
      partialize: (state) => ({ globalEditorLanguage: state.globalEditorLanguage }),
 | 
			
		||||
    }
 | 
			
		||||
  )
 | 
			
		||||
);
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user