- Delete `SyncService` and its associated bidirectional synchronization logic. - Add multiple context providers (`OfflineProvider`, `AlertProvider`, `LangContext`, `UserContext`, `SessionContext`, `WorldContext`, `SettingBookContext`) for contextual state management. - Implement `SecureStorage` for OS-level secure data encryption and replace dependency on `SyncService` synchronization. - Update localization files (`en.json`, `fr.json`) with offline mode and error-related strings.
15 lines
402 B
TypeScript
Executable File
15 lines
402 B
TypeScript
Executable File
import {ChapterProps} from "@/lib/models/Chapter";
|
|
import {createContext, Dispatch, SetStateAction} from "react";
|
|
|
|
|
|
export interface ChapterContextProps {
|
|
chapter: ChapterProps | undefined,
|
|
setChapter: Dispatch<SetStateAction<ChapterProps | undefined>>
|
|
}
|
|
|
|
export const ChapterContext = createContext<ChapterContextProps>({
|
|
chapter: undefined,
|
|
setChapter: () => {
|
|
}
|
|
})
|