lint everything

This commit is contained in:
2023-11-18 16:34:09 +01:00
parent 68e5977fb2
commit 1af65eb479
78 changed files with 2282 additions and 2258 deletions

View File

@@ -1,44 +1,43 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
import { Tab } from '@/services'
import { PayloadAction, createSlice } from '@reduxjs/toolkit'
export const decksSlice = createSlice({
name: 'decks',
initialState: {
currentPage: 1,
perPage: 10,
search: '',
minCards: 0,
maxCards: undefined as number | undefined,
currentTab: 'all' as Tab,
},
reducers: {
setCurrentPage: (state, action: PayloadAction<number>) => {
state.currentPage = action.payload
initialState: {
currentPage: 1,
currentTab: 'all' as Tab,
maxCards: undefined as number | undefined,
minCards: 0,
perPage: 10,
search: '',
},
setPerPage: (state, action: PayloadAction<number>) => {
state.perPage = action.payload
name: 'decks',
reducers: {
resetCurrentPage: state => {
state.currentPage = 1
},
resetFilters: state => {
state.search = ''
state.currentTab = 'all'
state.minCards = 0
state.maxCards = undefined
},
setCurrentPage: (state, action: PayloadAction<number>) => {
state.currentPage = action.payload
},
setCurrentTab: (state, action: PayloadAction<Tab>) => {
state.currentTab = action.payload
},
setMaxCards: (state, action: PayloadAction<number>) => {
state.maxCards = action.payload
},
setMinCards: (state, action: PayloadAction<number>) => {
state.minCards = action.payload
},
setPerPage: (state, action: PayloadAction<number>) => {
state.perPage = action.payload
},
setSearch: (state, action: PayloadAction<string>) => {
state.search = action.payload
},
},
setSearch: (state, action: PayloadAction<string>) => {
state.search = action.payload
},
setCurrentTab: (state, action: PayloadAction<Tab>) => {
state.currentTab = action.payload
},
setMinCards: (state, action: PayloadAction<number>) => {
state.minCards = action.payload
},
setMaxCards: (state, action: PayloadAction<number>) => {
state.maxCards = action.payload
},
resetFilters: state => {
state.search = ''
state.currentTab = 'all'
state.minCards = 0
state.maxCards = undefined
},
resetCurrentPage: state => {
state.currentPage = 1
},
},
})