✅ Added a validator
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
import * as React from "react";
|
||||
import { IFolderData } from "../shared/interfaces/comicinfo.interfaces";
|
||||
import { IExtractedComicBookCoverFile } from "../../server/interfaces/folder.interface";
|
||||
import { isArray, map, isUndefined, isEmpty, flatten } from "lodash";
|
||||
import { socket } from "./Import";
|
||||
import { walkFolder } from "../actions/fileops.actions";
|
||||
|
||||
interface IProps {
|
||||
comicBookCoversMetadata: any;
|
||||
comicBookCoversMetadata: IExtractedComicBookCoverFile[];
|
||||
}
|
||||
interface IState {}
|
||||
|
||||
class Card extends React.Component<IProps, IState> {
|
||||
constructor(props) {
|
||||
constructor(props: IProps) {
|
||||
super(props);
|
||||
}
|
||||
private removeLeadingPeriod = (string) => {
|
||||
@@ -19,8 +20,8 @@ class Card extends React.Component<IProps, IState> {
|
||||
}
|
||||
return string;
|
||||
};
|
||||
public drawCoverCard = (metadata) => {
|
||||
return map(metadata, (item) => {
|
||||
public drawCoverCard = (metadata: IExtractedComicBookCoverFile[]) => {
|
||||
return map(metadata, (item: IExtractedComicBookCoverFile) => {
|
||||
return (
|
||||
<div className="card">
|
||||
<div className="card-image">
|
||||
|
||||
@@ -4,7 +4,7 @@ import { connect } from "react-redux";
|
||||
import { fetchComicBookMetadata } from "../actions/fileops.actions";
|
||||
import { IFolderData } from "../shared/interfaces/comicinfo.interfaces";
|
||||
import Card from "./Card";
|
||||
import { io } from "socket.io-client";
|
||||
import { io, Socket } from "socket.io-client";
|
||||
|
||||
interface IProps {
|
||||
matches: unknown;
|
||||
@@ -17,7 +17,7 @@ interface IState {
|
||||
searchPaneIndex: number;
|
||||
fileOps: any;
|
||||
}
|
||||
let socket;
|
||||
let socket: Socket;
|
||||
class Import extends React.Component<IProps, IState> {
|
||||
constructor(props: IProps) {
|
||||
super(props);
|
||||
|
||||
Reference in New Issue
Block a user