Update chapter
This commit is contained in:
@@ -10,6 +10,7 @@ import { createContext, useContext } from 'react';
|
||||
import { ReaderStateChapters } from '@/modules/reader/types/Reader.types.ts';
|
||||
|
||||
export const ReaderStateChaptersContext = createContext<ReaderStateChapters>({
|
||||
mangaChapters: [],
|
||||
chapters: [],
|
||||
setReaderStateChapters: () => {},
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ import { ReaderStateChaptersContext } from '@/modules/reader/contexts/state/Read
|
||||
type TContext = ContextType<typeof ReaderStateChaptersContext>;
|
||||
|
||||
export const ReaderStateChaptersContextProvider = ({ children }: { children: ReactNode }) => {
|
||||
const [state, setState] = useState<Omit<TContext, 'setReaderStateChapters'>>({ chapters: [] });
|
||||
const [state, setState] = useState<Omit<TContext, 'setReaderStateChapters'>>({ mangaChapters: [], chapters: [] });
|
||||
|
||||
const value = useMemo(
|
||||
() => ({
|
||||
|
||||
Reference in New Issue
Block a user