Skip to content

Commit

Permalink
Fix linter failures
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierfacq committed Sep 19, 2023
1 parent 7f4fa42 commit cf6cca4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions src/Graph/Download.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ export default class DownloadTotal extends Component {
render () {
const { data, totalPieChartData } = this.state

if (!data) return (
<Spin tip="Loading" size="large">
<div className="content" />
</Spin>
)
if (!data) {
return (
<Spin tip="Loading" size="large">
<div className="content" />
</Spin>
)
}

const total = formatNum(data.total_downloads.total)

Expand Down
12 changes: 7 additions & 5 deletions src/Graph/Trends.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,13 @@ export default class Trends extends Component {
render () {
const state = this.state

if (!state.series || !state.series2 || !state.monthlyData) return (
<Spin tip="Loading" size="large">
<div className="content" />
</Spin>
)
if (!state.series || !state.series2 || !state.monthlyData) {
return (
<Spin tip="Loading" size="large">
<div className="content" />
</Spin>
)
}

return (
<>
Expand Down

0 comments on commit cf6cca4

Please sign in to comment.