🚛 Massive refactor of dashboard

This commit is contained in:
2022-05-23 22:01:51 -07:00
parent f0505d7428
commit d80c672cd1
18 changed files with 127 additions and 77 deletions

View File

@@ -37,7 +37,8 @@ export const Search = ({}: ISearchProps): ReactElement => {
);
const addToLibrary = useCallback(
(comicData) => dispatch(importToDB({ comicvine: comicData })),
(sourceName: string, comicData) =>
dispatch(importToDB(sourceName, { comicvine: comicData })),
[],
);
@@ -108,7 +109,7 @@ export const Search = ({}: ISearchProps): ReactElement => {
></p>
<button
className="button is-success is-light is-outlined"
onClick={() => addToLibrary(result)}
onClick={() => addToLibrary("comicvine", result)}
>
Add to Library
</button>