Change types and add default filterset object

This commit is contained in:
Justin Edmund 2023-03-20 10:01:43 -07:00
parent 84870dceb2
commit 062767549b
2 changed files with 24 additions and 3 deletions

View file

@ -2,9 +2,9 @@ interface FilterSet {
element?: number
raidSlug?: string
recency?: number
full_auto?: boolean
auto_guard?: boolean
charge_attack?: boolean
full_auto?: number
auto_guard?: number
charge_attack?: number
characters_count?: number
weapons_count?: number
summons_count?: number

21
utils/defaultFilters.tsx Normal file
View file

@ -0,0 +1,21 @@
const DEFAULT_FULL_AUTO = -1
const DEFAULT_AUTO_GUARD = -1
const DEFAULT_CHARGE_ATTACK = -1
const DEFAULT_MIN_CHARACTERS = 3
const DEFAULT_MIN_WEAPONS = 5
const DEFAULT_MIN_SUMMONS = 2
const DEFAULT_NAME_QUALITY = false
const DEFAULT_USER_QUALITY = false
const DEFAULT_ORIGINAL_ONLY = false
export const defaultFilterset: FilterSet = {
full_auto: DEFAULT_FULL_AUTO,
auto_guard: DEFAULT_AUTO_GUARD,
charge_attack: DEFAULT_CHARGE_ATTACK,
characters_count: DEFAULT_MIN_CHARACTERS,
weapons_count: DEFAULT_MIN_WEAPONS,
summons_count: DEFAULT_MIN_SUMMONS,
name_quality: DEFAULT_NAME_QUALITY,
user_quality: DEFAULT_USER_QUALITY,
original: DEFAULT_ORIGINAL_ONLY,
}