- 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.
14 lines
393 B
TypeScript
Executable File
14 lines
393 B
TypeScript
Executable File
import {Context, createContext, Dispatch, SetStateAction} from "react";
|
|
import {BookProps} from "@/lib/types/book";
|
|
|
|
export interface BookContextProps {
|
|
book: BookProps | null,
|
|
setBook: Dispatch<SetStateAction<BookProps | null>>
|
|
}
|
|
|
|
export const BookContext: Context<BookContextProps> = createContext<BookContextProps>({
|
|
book: null,
|
|
setBook: (): void => {
|
|
}
|
|
})
|