This commit is contained in:
haitao(lj) 2022-09-28 10:48:19 +08:00
parent 4ef98a4b58
commit 65a380c787
2 changed files with 10 additions and 5 deletions

View File

@ -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,
},

View File

@ -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')}