Created a GridLayout enum and updated all locations to use it. (#208)

So, that we can more easily refactor the code later
This commit is contained in:
amr
2022-12-20 07:05:31 +02:00
committed by GitHub
parent 7312e92d07
commit 2e3f57677e
6 changed files with 42 additions and 26 deletions

View File

@@ -12,11 +12,17 @@ type ContextType = {
setOptions: React.Dispatch<React.SetStateAction<LibraryOptions>>;
};
export enum GridLayout {
Compact = 0,
Comfortable = 1,
List = 2,
}
export const DefaultLibraryOptions: LibraryOptions = {
showDownloadBadge: false,
showUnreadBadge: false,
gridLayout: 0,
SourcegridLayout: 0,
gridLayout: GridLayout.Compact,
SourcegridLayout: GridLayout.Compact,
downloaded: undefined,
sortDesc: undefined,