🪢 Unwrangling state vars for global search vs local
This commit is contained in:
@@ -31,6 +31,7 @@ export const SearchBar = (data: ISearchBarProps): ReactElement => {
|
||||
from: 0,
|
||||
},
|
||||
type: "volumeName",
|
||||
trigger: "globalSearchBar"
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user