A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix(InviteToAnswer): Control the presentation of `invite_to_answer`
haitaoo2a02b9d5c0d2
diff --git a/ui/src/pages/Questions/Detail/components/InviteToAnswer/index.tsx b/ui/src/pages/Questions/Detail/components/InviteToAnswer/index.tsxindex 0855ba10..88d12b40 100644--- a/ui/src/pages/Questions/Detail/components/InviteToAnswer/index.tsx+++ b/ui/src/pages/Questions/Detail/components/InviteToAnswer/index.tsx@@ -137,13 +137,16 @@ const Index: FC<Props> = ({ questionId, readOnly = false }) => {</div>{showInviteDesc ? (<>- <div className="text-muted mb-3">{t('desc')}</div>- <Button- size="sm"- variant="outline-primary"- onClick={() => setEditing(true)}>- {t('invite')}- </Button>+ <div className="text-muted">{t('desc')}</div>+ {readOnly ? null : (+ <Button+ size="sm"+ variant="outline-primary"+ className="mt-3"+ onClick={() => setEditing(true)}>+ {t('invite')}+ </Button>+ )}</>) : null}</Card.Body>