Remove unused components and models for improved maintainability

- Deleted redundant components (`AddActionButton`, `AlertBox`, `AlertStack`, `BackButton`, `CancelButton`, and `CollapsableArea`) and related files.
- Removed unused models (`Book`, `BookSerie`, `BookTables`, `Character`, and `Chapter`) to reduce codebase clutter.
- Updated project structure and references to reflect these removals.
This commit is contained in:
natreex
2026-03-22 22:37:31 -04:00
parent e8aaef108b
commit 64ed90d993
229 changed files with 15091 additions and 21289 deletions

View File

@@ -1,35 +1,11 @@
import { createContext, Dispatch, SetStateAction } from 'react';
export interface OfflineMode {
isManuallyOffline: boolean;
isNetworkOnline: boolean;
isOffline: boolean;
isDatabaseInitialized: boolean;
error: string | null;
}
export interface OfflineContextType {
offlineMode: OfflineMode;
setOfflineMode: Dispatch<SetStateAction<OfflineMode>>;
toggleOfflineMode: () => void;
initializeDatabase: (userId: string, encryptionKey?: string) => Promise<boolean>;
isCurrentlyOffline: () => boolean;
}
export const defaultOfflineMode: OfflineMode = {
isManuallyOffline: false,
isNetworkOnline: typeof navigator !== 'undefined' ? navigator.onLine : true,
isOffline: false,
isDatabaseInitialized: false,
error: null
};
const OfflineContext = createContext<OfflineContextType>({
offlineMode: defaultOfflineMode,
setOfflineMode: () => {},
toggleOfflineMode: () => {},
initializeDatabase: async () => false,
isCurrentlyOffline: () => false
});
export default OfflineContext;
import {createContext} from 'react';
export interface OfflineContextType {
isCurrentlyOffline: () => boolean;
}
const OfflineContext = createContext<OfflineContextType>({
isCurrentlyOffline: () => false,
});
export default OfflineContext;