use eslint to lint project

drop code quality job
This commit is contained in:
2021-03-14 14:51:53 +00:00
parent ba2704b285
commit 1fc67365f0
42 changed files with 1614 additions and 843 deletions

View File

@ -11,14 +11,14 @@ interface params {
name: string;
}
interface props extends RouteComponentProps<params> {}
interface Props extends RouteComponentProps<params> {}
interface state {
data: VideoTypes.VideoUnloadedType[];
}
export class SearchHandling extends React.Component<props, state> {
constructor(props: props) {
export class SearchHandling extends React.Component<Props, state> {
constructor(props: Props) {
super(props);
this.state = {
@ -33,8 +33,8 @@ export class SearchHandling extends React.Component<props, state> {
render(): JSX.Element {
return (
<>
<PageTitle title='Search' subtitle={this.props.match.params.name + ': ' + this.state.data.length}/>
<SideBar hiddenFrame/>
<PageTitle title='Search' subtitle={this.props.match.params.name + ': ' + this.state.data.length} />
<SideBar hiddenFrame />
{this.getVideoData()}
</>
);
@ -45,11 +45,9 @@ export class SearchHandling extends React.Component<props, state> {
*/
getVideoData(): JSX.Element {
if (this.state.data.length !== 0) {
return (
<VideoContainer data={this.state.data}/>
);
return <VideoContainer data={this.state.data} />;
} else {
return (<div>No Data found!</div>);
return <div>No Data found!</div>;
}
}