Skip to content

Commit

Permalink
Merge branch 'feat/1.0.6/ui' of github.com:answerdev/answer into feat…
Browse files Browse the repository at this point in the history
…/1.0.6/ui
  • Loading branch information
haitaoo committed Feb 24, 2023
2 parents b431c2f + 775fb7a commit 6a1a893
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions ui/src/pages/Questions/Ask/index.tsx
Expand Up @@ -292,7 +292,7 @@ const Ask = () => {
navigate(pathFactory.questionLanding(id));
}
}
deleteDraft();
removeDraft();
}
};
const backPage = () => {
Expand Down 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
Expand Up @@ -147,7 +147,7 @@ const Index: FC<Props> = ({ visible = false, data, callback }) => {
errorMsg: '',
},
});
deleteDraft();
removeDraft();
callback?.(res.info);
})
.catch((ex) => {
Expand Down

0 comments on commit 6a1a893

Please sign in to comment.