Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

simplify of searchResults in state

ammarahm-ede1a759522440
diff --git a/apps/mobile/src/provider/DefaultState.js b/apps/mobile/src/provider/DefaultState.js
index a814da7ed..6fb952a87 100644
--- a/apps/mobile/src/provider/DefaultState.js
+++ b/apps/mobile/src/provider/DefaultState.js
@@ -53,11 +53,7 @@ export const defaultState = {
isLoginNavigator: false,
currentEditingNote: null,
loading: true,
- searchResults: {
- results: [],
- type: null,
- keyword: null,
- },
+ searchResults: [],
headerMenuState: true,
headerTextState: {
heading: 'Home',
@@ -65,10 +61,8 @@ export const defaultState = {
},
headerVerticalMenu: false,
searchState: {
- noSearch: false,
data: [],
type: 'notes',
- color: null,
placeholder: 'Search all notes',
},
containerBottomButton: {
diff --git a/apps/mobile/src/provider/Reducer.js b/apps/mobile/src/provider/Reducer.js
index 14a084c45..308430c82 100644
--- a/apps/mobile/src/provider/Reducer.js
+++ b/apps/mobile/src/provider/Reducer.js
@@ -179,11 +179,10 @@ export const reducer = (state, action) => {
};
}
case Actions.SEARCH_RESULTS: {
- let results = action.results;
return {
...state,
- searchResults: {...results},
+ searchResults:action.results,
};
}
case Actions.HEADER_STATE: {