[Glitch] Remove old search results with new search
Port 24fb862a65da2545c439ae33625b5a049343dc80 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
acb2c1a635
commit
50acfc48b9
@ -65,6 +65,9 @@ export const searchReducer = createReducer(initialState, (builder) => {
|
|||||||
(state, action) => {
|
(state, action) => {
|
||||||
state.type = action.meta.arg.type;
|
state.type = action.meta.arg.type;
|
||||||
state.loading = true;
|
state.loading = true;
|
||||||
|
if (action.type === submitSearch.pending.type) {
|
||||||
|
state.results = undefined;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user