Skip to content

Commit

Permalink
fix: write question hidden cancel button
Browse files Browse the repository at this point in the history
  • Loading branch information
shuashuai committed Feb 24, 2023
1 parent 457f53c commit 775fb7a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ui/src/pages/Questions/Ask/index.tsx
Expand Up @@ -421,10 +421,11 @@ const Ask = () => {
<Button type="submit" className="me-2">
{isEdit ? t('btn_save_edits') : t('btn_post_question')}
</Button>

<Button variant="link" onClick={backPage}>
{t('cancel', { keyPrefix: 'btns' })}
</Button>
{isEdit && (
<Button variant="link" onClick={backPage}>
{t('cancel', { keyPrefix: 'btns' })}
</Button>
)}

{hasDraft && (
<Button variant="link" onClick={deleteDraft}>
Expand Down

0 comments on commit 775fb7a

Please sign in to comment.