feat: simple api call to enable search

This commit is contained in:
Daniel Avila 2023-03-21 19:31:57 -04:00
parent 1041146fcb
commit 97a6cd801b
6 changed files with 50 additions and 38 deletions

View file

@ -1,6 +1,7 @@
import { createSlice } from '@reduxjs/toolkit';
const initialState = {
searchEnabled: false,
search: false,
query: '',
};
@ -10,7 +11,7 @@ const currentSlice = createSlice({
initialState,
reducers: {
setSearchState: (state, action) => {
state.search = action.payload;
state.searchEnabled = action.payload;
},
setQuery: (state, action) => {
const q = action.payload;