mirror of https://gitee.com/answerdev/answer.git
fix: question detail closed reason
This commit is contained in:
parent
2f2c79c26b
commit
9dfba0a79f
|
@ -187,6 +187,11 @@ const useReportModal = (callback?: () => void) => {
|
|||
}
|
||||
value={content.value}
|
||||
isInvalid={content.isInvalid}
|
||||
placeholder={
|
||||
item.content_type === 'text'
|
||||
? t('input_placeholder')
|
||||
: t('textarea_placeholder')
|
||||
}
|
||||
onChange={(e) =>
|
||||
setContent({
|
||||
value: e.target.value,
|
||||
|
|
|
@ -199,7 +199,9 @@
|
|||
},
|
||||
"msg": {
|
||||
"empty": "Please select a reason."
|
||||
}
|
||||
},
|
||||
"input_placeholder": "Enter the existing question link",
|
||||
"textarea_placeholder": "Let us know specifically what you are concerned about"
|
||||
},
|
||||
"tag_modal": {
|
||||
"title": "Create New Tag",
|
||||
|
@ -590,6 +592,8 @@
|
|||
"edit": "edit",
|
||||
"Views": "Views",
|
||||
"answered": "answered",
|
||||
"closed_in": "Closed in",
|
||||
"show_exist": "Show existing question.",
|
||||
"answers": {
|
||||
"title": "Answers",
|
||||
"score": "Score",
|
||||
|
@ -870,4 +874,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,44 @@
|
|||
import { memo, FC } from 'react';
|
||||
import { Alert } from 'react-bootstrap';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
interface Props {
|
||||
data;
|
||||
}
|
||||
const Index: FC<Props> = ({ data }) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Alert className="mb-4" variant="info">
|
||||
<div>
|
||||
<strong>{data.operation_msg} </strong>
|
||||
{data.operation_description}
|
||||
{data.operation_msg.indexOf('http') > -1 ? (
|
||||
<p>
|
||||
{data.operation_description}
|
||||
<a href={data.operation_msg} style={{ color: '#055160' }}>
|
||||
<strong>{t('question_detail.show_exist')}</strong>
|
||||
</a>
|
||||
</p>
|
||||
) : (
|
||||
<p>
|
||||
{data.operation_msg
|
||||
? data.operation_msg
|
||||
: data.operation_description}
|
||||
</p>
|
||||
)}
|
||||
<div className="fs-14">
|
||||
{t('question_detail.closed_in')}{' '}
|
||||
<time
|
||||
dateTime={dayjs.unix(data.operation_time).toISOString()}
|
||||
title={dayjs
|
||||
.unix(data.operation_time)
|
||||
.format(t('dates.long_date_with_time'))}>
|
||||
{dayjs
|
||||
.unix(data.operation_time)
|
||||
.format(t('dates.long_date_with_year'))}
|
||||
</time>
|
||||
.
|
||||
</div>
|
||||
</div>
|
||||
</Alert>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue