@@ -55,7 +55,6 @@ class SketchList extends React.Component {
55
55
< table className = "sketches-table" summary = "table containing all saved projects" >
56
56
< thead >
57
57
< tr >
58
- { /* <th className="sketch-list__trash-column" scope="col"></th> */ }
59
58
< th scope = "col" > Sketch</ th >
60
59
< th scope = "col" > Date created</ th >
61
60
< th scope = "col" > Date created</ th >
@@ -68,27 +67,14 @@ class SketchList extends React.Component {
68
67
< tr
69
68
className = "sketches-table__row"
70
69
key = { sketch . id }
71
- onClick = { ( ) => browserHistory . push ( `/${ username } /sketches/${ sketch . id } ` ) }
70
+ onClick = { ( ) => {
71
+ if ( this . state . actionDialogueDisplayed . some ( el => el ) ) {
72
+ this . closeAllDropdowns ( ) ;
73
+ return ;
74
+ }
75
+ browserHistory . push ( `/${ username } /sketches/${ sketch . id } ` ) ;
76
+ } }
72
77
>
73
- { /* <td className="sketch-list__trash-column">
74
- {(() => { // eslint-disable-line
75
- if (this.props.username === this.props.user.username || this.props.username === undefined) {
76
- return (
77
- <button
78
- className="sketch-list__trash-button"
79
- onClick={(e) => {
80
- e.stopPropagation();
81
- if (window.confirm(`Are you sure you want to delete "${sketch.name}"?`)) {
82
- this.props.deleteProject(sketch.id);
83
- }
84
- }}
85
- >
86
- <InlineSVG src={trashCan} alt="Delete Project" />
87
- </button>
88
- );
89
- }
90
- })() }
91
- </td> */ }
92
78
< th scope = "row" > < Link to = { `/${ username } /sketches/${ sketch . id } ` } > { sketch . name } </ Link > </ th >
93
79
< td > { moment ( sketch . createdAt ) . format ( 'MMM D, YYYY h:mm A' ) } </ td >
94
80
< td > { moment ( sketch . updatedAt ) . format ( 'MMM D, YYYY h:mm A' ) } </ td >
0 commit comments