import * as React from "react"; import _ from "lodash"; import { connect } from "react-redux"; import * as Comlink from "comlink"; import ExpensiveProcessor from "worker-loader!../workers/extractCovers.worker"; interface IProps { matches: unknown; } interface IState { folderWalkResults?: Array; searchPaneIndex: number; } class Import extends React.Component { constructor(props: IProps) { super(props); this.state = { folderWalkResults: [], searchPaneIndex: undefined, }; } public toggleSearchResultsPane(paneId: number): void { this.setState({ searchPaneIndex: paneId, }); } public async startFolderWalk() { const worker = Comlink.proxy(new ExpensiveProcessor()); console.log(new worker()); } public render() { return (

Import

Import Only {" "} will add comics identified from the mapped folder into the local db.

Import and Tag {" "} will scan the ComicVine, shortboxed APIs and import comics from the mapped folder with the additional metadata.

{/* Folder walk results */} {!_.isUndefined(this.state.folderWalkResults) ? ( <>
poopie
) : null}
); } } function mapStateToProps(state: IState) { return { // matches: state.comicInfo.searchResults, }; } const mapDispatchToProps = (dispatch) => ({ name: "rishi", }); export default connect(mapStateToProps, mapDispatchToProps)(Import);