2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-03 13:58:47 +00:00

Allow notifications to be opened in new tab or window (#8030)

This commit is contained in:
Oliver 2024-08-29 13:25:58 +10:00 committed by GitHub
parent 99e37de1d8
commit 3911694342
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,7 @@ import { Link, useNavigate } from 'react-router-dom';
import { api } from '../../App'; import { api } from '../../App';
import { ApiEndpoints } from '../../enums/ApiEndpoints'; import { ApiEndpoints } from '../../enums/ApiEndpoints';
import { navigateToLink } from '../../functions/navigation';
import { apiUrl } from '../../states/ApiState'; import { apiUrl } from '../../states/ApiState';
import { useUserState } from '../../states/UserState'; import { useUserState } from '../../states/UserState';
import { StylishText } from '../items/StylishText'; import { StylishText } from '../items/StylishText';
@ -103,9 +104,9 @@ export function NotificationDrawer({
</Tooltip> </Tooltip>
<Tooltip label={t`View all notifications`}> <Tooltip label={t`View all notifications`}>
<ActionIcon <ActionIcon
onClick={() => { onClick={(event: any) => {
onClose(); onClose();
navigate('/notifications/unread'); navigateToLink('/notifications/unread', navigate, event);
}} }}
variant="transparent" variant="transparent"
> >