Skip to content

Commit

Permalink
refactor: display only changed subsection and units in publish modal
Browse files Browse the repository at this point in the history
  • Loading branch information
navinkarkera committed Nov 27, 2023
1 parent c8c0118 commit a5b34f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/course-outline/publish-modal/PublishModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const PublishModal = ({
</ModalDialog.Header>
<ModalDialog.Body>
<p className="small">{intl.formatMessage(messages.description)}</p>
{subSections.map((subSection) => {
const units = subSection.childInfo.children;
{subSections.filter(subSection => subSection.hasChanges).map((subSection) => {
const units = subSection.childInfo.children.filter(unit => unit.hasChanges);

return units.length ? (
<React.Fragment key={subSection.id}>
Expand Down

0 comments on commit a5b34f8

Please sign in to comment.