File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ const CreateShape = (props) => {
328328 backdrop = "static"
329329 >
330330 < Modal . Header closeButton >
331- < Modal . Title > Create a Shape</ Modal . Title >
331+ < Modal . Title > { props . edit ? "Edit Shape" : "Create Shape" } </ Modal . Title >
332332 </ Modal . Header >
333333 < Modal . Body >
334334 < Container fluid >
Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ const Header = ({
238238 < CreateShape
239239 show = { showCreateShape }
240240 handleClose = { closeModal }
241+ edit = { false }
241242 user = { user }
242243 shapeAction = { shapeAction }
243244 setShapeAction = { setShapeAction } />
Original file line number Diff line number Diff line change @@ -388,7 +388,8 @@ const ShapeList = (
388388 { shapeToEdit && < CreateShape
389389 show = { showEditModal }
390390 handleClose = { closeEditModal }
391- shapeInformation = { shapeToSourceCopy } />
391+ shapeInformation = { shapeToEdit }
392+ edit = { true } />
392393 }
393394
394395 {
@@ -438,7 +439,7 @@ const ShapeList = (
438439 size = { 24 } />
439440 </ Button >
440441 { shape . private ?
441- < Button title = "Edit Shape" vairant = "outline-light" onClick = { ( ) => performEdit ( shape ) } className = "btn-icon" >
442+ < Button title = "Edit Shape" vairant = "outline-light" onClick = { ( ) => { performEdit ( shape ) ; console . log ( shape ) } } className = "btn-icon" >
442443 Edit
443444 </ Button > : null
444445 }
You can’t perform that action at this time.
0 commit comments