Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/discussions/common/AlertBanner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const AlertBanner = ({
closeReason,
editByLabel,
closedByLabel,
postData,
}) => {
const intl = useIntl();
const userHasModerationPrivileges = useSelector(selectUserHasModerationPrivileges);
Expand Down Expand Up @@ -53,6 +54,7 @@ const AlertBanner = ({
authorLabel={editByLabel}
labelColor={editByLabelColor && `text-${editByLabelColor}`}
reason={lastEdit.reason}
postData={postData}
/>
)}
{closed && (
Expand All @@ -62,6 +64,7 @@ const AlertBanner = ({
authorLabel={closedByLabel}
labelColor={closedByLabelColor && `text-${closedByLabelColor}`}
reason={closeReason}
postData={postData}
/>
)}
</>
Expand All @@ -82,6 +85,7 @@ AlertBanner.propTypes = {
editorUsername: PropTypes.string,
reason: PropTypes.string,
}),
postData: PropTypes.shape({}),
};

AlertBanner.defaultProps = {
Expand All @@ -92,6 +96,7 @@ AlertBanner.defaultProps = {
closeReason: undefined,
editByLabel: undefined,
lastEdit: {},
postData: null,
};

export default React.memo(AlertBanner);
4 changes: 4 additions & 0 deletions src/discussions/common/AlertBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const AlertBar = ({
authorLabel,
labelColor,
reason,
postData,
}) => {
const intl = useIntl();

Expand All @@ -28,6 +29,7 @@ const AlertBar = ({
labelColor={labelColor}
linkToProfile
postOrComment
postData={postData}
/>
</span>
<span
Expand All @@ -48,6 +50,7 @@ AlertBar.propTypes = {
authorLabel: PropTypes.string,
labelColor: PropTypes.string,
reason: PropTypes.string,
postData: PropTypes.shape({}),
};

AlertBar.defaultProps = {
Expand All @@ -56,6 +59,7 @@ AlertBar.defaultProps = {
authorLabel: '',
labelColor: '',
reason: '',
postData: null,
};

export default React.memo(AlertBar);
Loading