File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
frontend/src/containers/Thesis Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ export class ThesisList extends Component {
3030 }
3131 }
3232
33+ handleThesisDelete ( thesisId ) {
34+ if ( ! window . confirm ( 'Are you sure you want to delete this thesis?' ) ) return
35+ this . props . deleteThesis ( thesisId )
36+ }
37+
3338 toggleThesis = thesis => ( ) => {
3439 const selectedThesesIds = this . state . selectedThesesIds . includes ( thesis . thesisId ) ?
3540 this . state . selectedThesesIds . filter ( id => id !== thesis . thesisId ) :
@@ -179,7 +184,7 @@ export class ThesisList extends Component {
179184 showButtons = { this . props . showButtons }
180185 selectable = { this . props . selectable }
181186 selectedThesesIds = { this . state . selectedThesesIds }
182- onDelete = { ( ) => this . props . deleteThesis ( thesis . thesisId ) }
187+ onDelete = { ( ) => this . handleThesisDelete ( thesis . thesisId ) }
183188 />
184189 ) ) }
185190 </ tbody >
You can’t perform that action at this time.
0 commit comments