feat: SW-693 Moved state changes to reducer
This commit is contained in:
@@ -21,6 +21,7 @@ export enum ActionType {
|
||||
CLEAR_SEARCH_LOCATIONS = "CLEAR_SEARCH_LOCATIONS",
|
||||
SEARCH_LOCATIONS = "SEARCH_LOCATIONS",
|
||||
SELECT_ITEM = "SELECT_ITEM",
|
||||
SET_STORAGE_DATA = "SET_STORAGE_DATA",
|
||||
}
|
||||
|
||||
interface ClearHistoryLocationsAction {
|
||||
@@ -46,11 +47,20 @@ interface SetItemAction {
|
||||
type: ActionType.SELECT_ITEM
|
||||
}
|
||||
|
||||
interface SetStorageData {
|
||||
payload: {
|
||||
searchData: Location
|
||||
searchHistory: Locations
|
||||
}
|
||||
type: ActionType.SET_STORAGE_DATA
|
||||
}
|
||||
|
||||
export type Action =
|
||||
| ClearHistoryLocationsAction
|
||||
| ClearSearchLocationsAction
|
||||
| SearchLocationsAction
|
||||
| SetItemAction
|
||||
| SetStorageData
|
||||
|
||||
export interface State {
|
||||
defaultLocations: Locations
|
||||
|
||||
Reference in New Issue
Block a user