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: tag info page delete tag will redirect to tags page
shuai871792a0c748
diff --git a/ui/src/pages/Tags/Info/index.tsx b/ui/src/pages/Tags/Info/index.tsxindex 69334ab3..54e717c1 100644--- a/ui/src/pages/Tags/Info/index.tsx+++ b/ui/src/pages/Tags/Info/index.tsx@@ -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 });+ });},});};diff --git a/ui/src/utils/request.ts b/ui/src/utils/request.tsindex 8ba18831..a03eb523 100644--- a/ui/src/utils/request.ts+++ b/ui/src/utils/request.ts@@ -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 messagetoastStore.getState().show({