feat(web): add lint (#875)

* feat: add lint

* feat: fix lint error

* chore: add ignore file

* chore: close indent
This commit is contained in:
キリサメ qianxi
2022-07-10 15:45:55 +08:00
committed by GitHub
parent 475b6da35a
commit 503d244166
121 changed files with 17023 additions and 16815 deletions

View File

@ -61,14 +61,14 @@ class HomePage extends React.Component {
}
} else {
this.state.applications.forEach(application => {
console.log(application)
console.log(application);
items.push({
link: application.homepageUrl, name: application.displayName, organizer: application.description, logo: application.logo, createdTime: "",
});
});
}
return items
return items;
}
renderCards() {
@ -85,25 +85,25 @@ class HomePage extends React.Component {
items.map(item => {
return (
<SingleCard logo={item.logo} link={item.link} title={item.name} desc={item.organizer} isSingle={items.length === 1} />
)
);
})
}
</Card>
)
);
} else {
return (
<div style={{marginRight: "15px", marginLeft: "15px"}}>
<Row style={{marginLeft: "-20px", marginRight: "-20px", marginTop: "20px"}} gutter={24}>
{
items.map(item => {
return (
<SingleCard logo={item.logo} link={item.link} title={item.name} desc={item.organizer} time={item.createdTime} isSingle={items.length === 1} key={item.name} />
)
})
}
</Row>
<Row style={{marginLeft: "-20px", marginRight: "-20px", marginTop: "20px"}} gutter={24}>
{
items.map(item => {
return (
<SingleCard logo={item.logo} link={item.link} title={item.name} desc={item.organizer} time={item.createdTime} isSingle={items.length === 1} key={item.name} />
);
})
}
</Row>
</div>
)
);
}
}
@ -118,7 +118,7 @@ class HomePage extends React.Component {
</Col>
</Row>
</div>
)
);
}
}

View File

@ -17,7 +17,7 @@ import {Card, Col} from "antd";
import * as Setting from "../Setting";
import {withRouter} from "react-router-dom";
const { Meta } = Card;
const {Meta} = Card;
class SingleCard extends React.Component {
constructor(props) {
@ -29,20 +29,20 @@ class SingleCard extends React.Component {
renderCardMobile(logo, link, title, desc, time, isSingle) {
const gridStyle = {
width: '100vw',
textAlign: 'center',
cursor: 'pointer',
width: "100vw",
textAlign: "center",
cursor: "pointer",
};
return (
<Card.Grid style={gridStyle} onClick={() => Setting.goToLinkSoft(this, link)}>
<img src={logo} alt="logo" height={60} style={{marginBottom: '20px'}}/>
<img src={logo} alt="logo" height={60} style={{marginBottom: "20px"}} />
<Meta
title={title}
description={desc}
/>
</Card.Grid>
)
);
}
renderCard(logo, link, title, desc, time, isSingle) {
@ -57,12 +57,12 @@ class SingleCard extends React.Component {
style={isSingle ? {width: "320px"} : {width: "100%"}}
>
<Meta title={title} description={desc} />
<br/>
<br/>
<br />
<br />
<Meta title={""} description={Setting.getFormattedDateShort(time)} />
</Card>
</Col>
)
);
}
render() {