April 2020
Intermediate to advanced
716 pages
18h 55m
English
When the instructor clicks on the PUBLISH button, they will see a dialog box informing them of the consequences of this action, and giving them the options to PUBLISH the course or CANCEL the action. The dialog box will look as follows:

To implement this dialog box, we will use the Material-UI Dialog component with the title and content text, and the PUBLISH and CANCEL buttons, as shown in the following code.
mern-classroom/client/course/Course.js
<Dialog open={open} onClose={handleClose} aria-labelledby="form-dialog-title"> <DialogTitle id="form-dialog-title">Publish Course</DialogTitle> <DialogContent> <Typography variant="body1"> ...Read now
Unlock full access