refactor ChapterOptions (#126)
* Added a useLocalStorageReducer funtion This is mostly a refactor of ChapterOptions to simplify it with a reducer function Also moved a lot of function used in ChaperList to a utility file * Added UseCallback where needed * renamed utility folder to util to follow the convention throughout the app * Refactor: Moved Resume FAB to seperate file * Renamed Types and Function for chapter filtering and sorting with the chapterOption prefix * more renaming
This commit is contained in:
6
src/typings.d.ts
vendored
6
src/typings.d.ts
vendored
@@ -230,3 +230,9 @@ interface ChapterListOptions {
|
||||
sortBy: ChapterSortMode
|
||||
showChapterNumber: boolean
|
||||
}
|
||||
|
||||
type ChapterOptionsReducerAction =
|
||||
{ type: 'filter', filterType:string, filterValue: NullAndUndefined<boolean> }
|
||||
| { type: 'sortBy', sortBy: ChapterSortMode }
|
||||
| { type: 'sortReverse' }
|
||||
| { type: 'showChapterNumber' };
|
||||
|
||||
Reference in New Issue
Block a user