🪢 Unwrangling state vars for global search vs local

This commit is contained in:
2022-08-18 00:10:31 -07:00
parent 5f59456c8b
commit 9bbf2efc3c
6 changed files with 50 additions and 14 deletions

View File

@@ -31,6 +31,7 @@ export const SearchBar = (data: ISearchBarProps): ReactElement => {
from: 0,
},
type: "volumeName",
trigger: "globalSearchBar"
},
),
);

View File

@@ -18,13 +18,14 @@ const LibraryContainer = (): ReactElement => {
from: 0,
},
type: "all",
trigger: "libraryPage"
},
),
);
}, []);
const searchResults = useSelector(
(state: RootState) => state.fileOps.librarySearchResults,
(state: RootState) => state.fileOps.libraryComics,
);
const searchError = useSelector(
(state: RootState) => state.fileOps.librarySearchError,

View File

@@ -8,7 +8,7 @@ import MetadataPanel from "../shared/MetadataPanel";
export const WantedComics = (props): ReactElement => {
const wantedComics = useSelector(
(state: RootState) => state.fileOps.librarySearchResultsFormatted,
(state: RootState) => state.fileOps.wantedComics,
);
const dispatch = useDispatch();
useEffect(() => {
@@ -23,6 +23,7 @@ export const WantedComics = (props): ReactElement => {
from: 0,
},
type: "wanted",
trigger: "wantedComicsPage"
},
),
);