MM-57841 - Updating post delete modal (#26907)

Этот коммит содержится в:
Asaad Mahmood
2024-05-01 11:23:23 -07:00
коммит произвёл GitHub
родитель 4db2ae5753
Коммит 6028cbe4e2
2 изменённых файлов: 21 добавлений и 23 удалений

Просмотреть файл

@@ -72,8 +72,6 @@ exports[`components/delete_post_modal should match snapshot for delete_post_moda
}
}
/>
<br />
<br />
</ModalBody>
<ModalFooter
bsClass="modal-footer"
@@ -177,17 +175,19 @@ exports[`components/delete_post_modal should match snapshot for delete_post_moda
}
}
/>
<br />
<br />
<MemoizedFormattedMessage
defaultMessage="This post has {count, number} {count, plural, one {comment} other {comments}} on it."
id="delete_post.warning"
values={
Object {
"count": 1,
<div
className="mt-2"
>
<MemoizedFormattedMessage
defaultMessage="This post has {count, number} {count, plural, one {comment} other {comments}} on it."
id="delete_post.warning"
values={
Object {
"count": 1,
}
}
}
/>
/>
</div>
</ModalBody>
<ModalFooter
bsClass="modal-footer"
@@ -291,8 +291,6 @@ exports[`components/delete_post_modal should match snapshot for post with 1 comm
}
}
/>
<br />
<br />
</ModalBody>
<ModalFooter
bsClass="modal-footer"

Просмотреть файл

@@ -106,13 +106,15 @@ export default class DeletePostModal extends React.PureComponent<Props, State> {
if (this.props.commentCount > 0 && this.props.post.root_id === '') {
commentWarning = (
<FormattedMessage
id='delete_post.warning'
defaultMessage='This post has {count, number} {count, plural, one {comment} other {comments}} on it.'
values={{
count: this.props.commentCount,
}}
/>
<div className='mt-2'>
<FormattedMessage
id='delete_post.warning'
defaultMessage='This post has {count, number} {count, plural, one {comment} other {comments}} on it.'
values={{
count: this.props.commentCount,
}}
/>
</div>
);
}
@@ -161,8 +163,6 @@ export default class DeletePostModal extends React.PureComponent<Props, State> {
term: (postTerm),
}}
/>
<br/>
<br/>
{commentWarning}
</Modal.Body>
<Modal.Footer>