mirror of https://gitee.com/answerdev/answer.git
fix: #941
This commit is contained in:
parent
4ef98a4b58
commit
65a380c787
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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')}
|
||||
|
|
Loading…
Reference in New Issue