2022-05-28 11:03:36 +02:00
|
|
|
import * as React from 'react';
|
2022-06-05 11:40:43 +02:00
|
|
|
import I18n from 'i18n-js';
|
|
|
|
|
|
2022-05-28 11:03:36 +02:00
|
|
|
import { MutedText } from '../shared/CustomTexts';
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
postUpdateFlagValue: boolean;
|
|
|
|
|
handlePostUpdateFlag(): void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const NewCommentUpdateSection = ({
|
|
|
|
|
postUpdateFlagValue,
|
|
|
|
|
handlePostUpdateFlag,
|
|
|
|
|
}: Props) => (
|
|
|
|
|
<div className="commentIsUpdateForm">
|
|
|
|
|
<div>
|
|
|
|
|
<input
|
|
|
|
|
id="isPostUpdateFlag"
|
|
|
|
|
type="checkbox"
|
|
|
|
|
onChange={handlePostUpdateFlag}
|
|
|
|
|
checked={postUpdateFlagValue || false}
|
|
|
|
|
/>
|
|
|
|
|
|
2022-06-05 11:40:43 +02:00
|
|
|
<label htmlFor="isPostUpdateFlag">{I18n.t('post.new_comment.is_post_update')}</label>
|
2022-05-28 11:03:36 +02:00
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
postUpdateFlagValue ?
|
2022-06-05 11:40:43 +02:00
|
|
|
<MutedText>{I18n.t('post.new_comment.user_notification')}</MutedText>
|
2022-05-28 11:03:36 +02:00
|
|
|
:
|
|
|
|
|
null
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export default NewCommentUpdateSection;
|