mirror of https://gitee.com/answerdev/answer.git
Merge pull request #231 from answerdev/feat/1.0.6/ui
fix: question detail show delete msg for admin users
This commit is contained in:
commit
77546afdab
|
@ -1416,8 +1416,10 @@ ui:
|
|||
reputation: reputation
|
||||
votes: votes
|
||||
prompt:
|
||||
leave_page: "Are you sure you want to leave the page?"
|
||||
changes_not_save: "Your changes may not be saved."
|
||||
leave_page: Are you sure you want to leave the page?
|
||||
changes_not_save: Your changes may not be saved.
|
||||
draft:
|
||||
discard_confirm: "Are you sure you want to discard your draft?"
|
||||
discard_confirm: Are you sure you want to discard your draft?
|
||||
messages:
|
||||
post_deleted: This post has been deleted.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { memo, FC, useEffect, useRef } from 'react';
|
||||
import { Button } from 'react-bootstrap';
|
||||
import { Button, Alert } from 'react-bootstrap';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link, useSearchParams } from 'react-router-dom';
|
||||
|
||||
|
@ -72,6 +72,11 @@ const Index: FC<Props> = ({
|
|||
}
|
||||
return (
|
||||
<div id={data.id} ref={answerRef} className="answer-item py-4">
|
||||
{data.status === 10 && (
|
||||
<Alert variant="danger" className="mb-4">
|
||||
{t('post_deleted', { keyPrefix: 'messages' })}
|
||||
</Alert>
|
||||
)}
|
||||
<article
|
||||
dangerouslySetInnerHTML={{ __html: data?.html }}
|
||||
className="fmt text-break text-wrap"
|
||||
|
|
Loading…
Reference in New Issue