File tree Expand file tree Collapse file tree 4 files changed +34
-8
lines changed Expand file tree Collapse file tree 4 files changed +34
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ import getSortedCollections from '../selectors/collections';
13
13
import Loader from '../../App/components/loader' ;
14
14
import QuickAddList from './QuickAddList' ;
15
15
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 ;
17
18
18
19
class CollectionList extends React . Component {
19
20
constructor ( props ) {
@@ -55,7 +56,6 @@ class CollectionList extends React.Component {
55
56
}
56
57
57
58
render ( ) {
58
- const username = this . props . username !== undefined ? this . props . username : this . props . user . username ;
59
59
const { collections, project } = this . props ;
60
60
const hasCollections = collections . length > 0 ;
61
61
const collectionWithSketchStatus = collections . map ( collection => ( {
@@ -69,7 +69,13 @@ class CollectionList extends React.Component {
69
69
if ( this . props . loading && ! this . state . hasLoadedData ) {
70
70
content = < Loader /> ;
71
71
} 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
+ ) ;
73
79
} else {
74
80
content = 'No collections' ;
75
81
}
Original file line number Diff line number Diff line change @@ -60,7 +60,13 @@ class SketchList extends React.Component {
60
60
if ( this . props . loading && this . state . isInitialDataLoad ) {
61
61
content = < Loader /> ;
62
62
} 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
+ ) ;
64
70
} else {
65
71
content = 'No collections' ;
66
72
}
Original file line number Diff line number Diff line change @@ -141,9 +141,17 @@ class CollectionList extends React.Component {
141
141
</ table > }
142
142
{
143
143
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
+ >
145
150
< 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
+ />
147
155
</ div >
148
156
</ Overlay >
149
157
)
Original file line number Diff line number Diff line change @@ -256,7 +256,8 @@ class Collection extends React.Component {
256
256
257
257
_renderEmptyTable ( ) {
258
258
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 ;
260
261
261
262
if ( ! isLoading && ! hasCollectionItems ) {
262
263
return ( < p className = "collection-empty-message" > No sketches in collection</ p > ) ;
@@ -321,7 +322,12 @@ class Collection extends React.Component {
321
322
}
322
323
{
323
324
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
+ >
325
331
< div className = "collection-add-sketch" >
326
332
< AddToCollectionSketchList username = { this . props . username } collection = { this . props . collection } />
327
333
</ div >
You can’t perform that action at this time.
0 commit comments