feat: SW-693 Moved state changes to reducer

This commit is contained in:
Hrishikesh Vaipurkar
2024-10-31 21:23:06 +01:00
parent 726a57c515
commit 0a430a0480
3 changed files with 26 additions and 2 deletions

View File

@@ -68,6 +68,13 @@ export function reducer(state: State, action: Action) {
searchHistory: action.payload.searchHistory,
}
}
case ActionType.SET_STORAGE_DATA: {
return {
...state,
searchData: action.payload.searchData,
searchHistory: action.payload.searchHistory,
}
}
default:
const unhandledActionType: never = type
console.info(`Unhandled type: ${unhandledActionType}`)