mirror of https://gitee.com/answerdev/answer.git
Merge pull request #286 from answerdev/feat/1.0.8/ui
fix: tag info page delete tag will redirect to tags page
This commit is contained in:
commit
3cb9b2aa51
|
@ -108,7 +108,9 @@ const TagIntroduction = () => {
|
|||
confirmText: t('delete', { keyPrefix: 'btns' }),
|
||||
confirmBtnVariant: 'danger',
|
||||
onConfirm: () => {
|
||||
deleteTag(tagInfo.tag_id);
|
||||
deleteTag(tagInfo.tag_id).then(() => {
|
||||
navigate('/tags', { replace: true });
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
|
@ -62,10 +62,10 @@ class Request {
|
|||
} = error.response || {};
|
||||
const { data = {}, msg = '' } = errModel || {};
|
||||
if (status === 400) {
|
||||
if (data.err_type && errConfig?.passingError) {
|
||||
if (data?.err_type && errConfig?.passingError) {
|
||||
return errModel;
|
||||
}
|
||||
if (data.err_type) {
|
||||
if (data?.err_type) {
|
||||
if (data.err_type === 'toast') {
|
||||
// toast error message
|
||||
toastStore.getState().show({
|
||||
|
|
Loading…
Reference in New Issue