Skip to content

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: #941

haitao(lj)65a380c7879f
diff --git a/ui/config-overrides.js b/ui/config-overrides.js
index f9352d29..65e8a206 100644
--- a/ui/config-overrides.js
+++ b/ui/config-overrides.js
@@ -26,8 +26,7 @@ module.exports = {
const config = configFunction(proxy, allowedHost);
config.proxy = {
'/answer': {
- target: 'http://10.0.20.84:8080',
- // target: 'http://10.0.10.98:2060',
+ target: 'http://10.0.10.98:2060',
changeOrigin: true,
secure: false,
},
diff --git a/ui/src/pages/Notifications/index.tsx b/ui/src/pages/Notifications/index.tsx
index edd0cff8..4350c44e 100644
--- a/ui/src/pages/Notifications/index.tsx
+++ b/ui/src/pages/Notifications/index.tsx
@@ -45,7 +45,8 @@ const Notifications = () => {
}, [data]);
const navigate = useNavigate();
- const handleTypeChange = (val) => {
+ const handleTypeChange = (evt, val) => {
+ evt.preventDefault();
navigate(`/users/notifications/${val}`);
};
@@ -72,19 +73,24 @@ const Notifications = () => {
<div className="d-flex justify-content-between mb-3">
<ButtonGroup size="sm">
<Button
+ as="a"
+ href="/users/notifications/inbox"
variant="outline-secondary"
active={type === 'inbox'}
- onClick={() => handleTypeChange('inbox')}>
+ onClick={(evt) => handleTypeChange(evt, 'inbox')}>
{t('inbox')}
</Button>
<Button
+ as="a"
+ href="/users/notifications/achievement"
variant="outline-secondary"
active={type === 'achievement'}
- onClick={() => handleTypeChange('achievement')}>
+ onClick={(evt) => handleTypeChange(evt, 'achievement')}>
{t('achievement')}
</Button>
</ButtonGroup>
<Button
+ size="sm"
variant="outline-secondary"
onClick={handleUnreadNotification}>
{t('all_read')}