mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Fix linter errors
This commit is contained in:
15 files changed
+93
-70
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { useContext } from 'react';
|
||||
import { AISettingsContext, type AISettingsContextType } from '@/contexts/AISettingsContext';
|
||||
|
||||
/**
|
||||
* Hook to access and update AI settings
|
||||
* @returns AI settings context with settings and update methods
|
||||
*/
|
||||
export function useAISettings(): AISettingsContextType {
|
||||
const context = useContext(AISettingsContext);
|
||||
if (!context) {
|
||||
throw new Error('useAISettings must be used within AISettingsProvider');
|
||||
}
|
||||
return context;
|
||||
}
|
||||
+12
-3
@@ -1,5 +1,14 @@
|
||||
import { useFS as useInternalFS } from '@/contexts/FSContext';
|
||||
import { useContext } from 'react';
|
||||
import { FSContext, type FSContextType } from '@/contexts/FSContext';
|
||||
|
||||
export function useFS() {
|
||||
return useInternalFS();
|
||||
/**
|
||||
* Hook to access the filesystem
|
||||
* @returns Filesystem context with fs instance
|
||||
*/
|
||||
export function useFS(): FSContextType {
|
||||
const context = useContext(FSContext);
|
||||
if (context === undefined) {
|
||||
throw new Error('useFS must be used within a FSProvider');
|
||||
}
|
||||
return context;
|
||||
}
|
||||
Reference in new issue
Block a user