Skip to content

Commit a5b6256

Browse files
committed
Fix linter warnings
1 parent 4d0aa23 commit a5b6256

File tree

4 files changed

+34
-8
lines changed

4 files changed

+34
-8
lines changed

client/modules/IDE/components/AddToCollectionList.jsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import getSortedCollections from '../selectors/collections';
1313
import Loader from '../../App/components/loader';
1414
import QuickAddList from './QuickAddList';
1515

16-
const projectInCollection = (project, collection) => collection.items.find(item => item.project.id === project.id) != null;
16+
const projectInCollection = (project, collection) =>
17+
collection.items.find(item => item.project.id === project.id) != null;
1718

1819
class CollectionList extends React.Component {
1920
constructor(props) {
@@ -55,7 +56,6 @@ class CollectionList extends React.Component {
5556
}
5657

5758
render() {
58-
const username = this.props.username !== undefined ? this.props.username : this.props.user.username;
5959
const { collections, project } = this.props;
6060
const hasCollections = collections.length > 0;
6161
const collectionWithSketchStatus = collections.map(collection => ({
@@ -69,7 +69,13 @@ class CollectionList extends React.Component {
6969
if (this.props.loading && !this.state.hasLoadedData) {
7070
content = <Loader />;
7171
} else if (hasCollections) {
72-
content = <QuickAddList items={collectionWithSketchStatus} onAdd={this.handleCollectionAdd} onRemove={this.handleCollectionRemove} />;
72+
content = (
73+
<QuickAddList
74+
items={collectionWithSketchStatus}
75+
onAdd={this.handleCollectionAdd}
76+
onRemove={this.handleCollectionRemove}
77+
/>
78+
);
7379
} else {
7480
content = 'No collections';
7581
}

client/modules/IDE/components/AddToCollectionSketchList.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ class SketchList extends React.Component {
6060
if (this.props.loading && this.state.isInitialDataLoad) {
6161
content = <Loader />;
6262
} else if (hasSketches) {
63-
content = <QuickAddList items={sketchesWithAddedStatus} onAdd={this.handleCollectionAdd} onRemove={this.handleCollectionRemove} />;
63+
content = (
64+
<QuickAddList
65+
items={sketchesWithAddedStatus}
66+
onAdd={this.handleCollectionAdd}
67+
onRemove={this.handleCollectionRemove}
68+
/>
69+
);
6470
} else {
6571
content = 'No collections';
6672
}

client/modules/IDE/components/CollectionList/CollectionList.jsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,17 @@ class CollectionList extends React.Component {
141141
</table>}
142142
{
143143
this.state.addingSketchesToCollectionId && (
144-
<Overlay title="Add sketches" actions={<SketchSearchbar />} closeOverlay={this.hideAddSketches} isFixedHeight>
144+
<Overlay
145+
title="Add sketches"
146+
actions={<SketchSearchbar />}
147+
closeOverlay={this.hideAddSketches}
148+
isFixedHeight
149+
>
145150
<div className="collection-add-sketch">
146-
<AddToCollectionSketchList username={this.props.username} collection={find(this.props.collections, { id: this.state.addingSketchesToCollectionId })} />
151+
<AddToCollectionSketchList
152+
username={this.props.username}
153+
collection={find(this.props.collections, { id: this.state.addingSketchesToCollectionId })}
154+
/>
147155
</div>
148156
</Overlay>
149157
)

client/modules/User/components/Collection.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ class Collection extends React.Component {
256256

257257
_renderEmptyTable() {
258258
const isLoading = this.props.loading;
259-
const hasCollectionItems = this.props.collection != null && this.props.collection.items.length > 0;
259+
const hasCollectionItems = this.props.collection != null &&
260+
this.props.collection.items.length > 0;
260261

261262
if (!isLoading && !hasCollectionItems) {
262263
return (<p className="collection-empty-message">No sketches in collection</p>);
@@ -321,7 +322,12 @@ class Collection extends React.Component {
321322
}
322323
{
323324
this.state.isAddingSketches && (
324-
<Overlay title="Add sketches" actions={<SketchSearchbar />} closeOverlay={this.hideAddSketches} isFixedHeight>
325+
<Overlay
326+
title="Add sketches"
327+
actions={<SketchSearchbar />}
328+
closeOverlay={this.hideAddSketches}
329+
isFixedHeight
330+
>
325331
<div className="collection-add-sketch">
326332
<AddToCollectionSketchList username={this.props.username} collection={this.props.collection} />
327333
</div>

0 commit comments

Comments
 (0)