diff options
| author | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2025-05-20 11:24:33 +0200 |
|---|---|---|
| committer | Sebastian Holmin <sebastian.holmin@mullvad.net> | 2025-05-28 13:25:41 +0200 |
| commit | 1ee32c33534ba57998cd1c8a08e58cf6b139785a (patch) | |
| tree | d6f33e5c455e6ec7390068162664ef760cd57c0b | |
| parent | b5b89ac31ee89f5675a20633a5edcafb97c77448 (diff) | |
| download | mullvadvpn-1ee32c33534ba57998cd1c8a08e58cf6b139785a.tar.xz mullvadvpn-1ee32c33534ba57998cd1c8a08e58cf6b139785a.zip | |
Update click handling to expect 'navigate-external' action types
For in app notifications all notifications should now use
the 'navigate-external' type instead of 'open-url'.
| -rw-r--r-- | desktop/packages/mullvad-vpn/src/renderer/components/NotificationArea.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/NotificationArea.tsx b/desktop/packages/mullvad-vpn/src/renderer/components/NotificationArea.tsx index d23d0813f2..eea5d3db1c 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/components/NotificationArea.tsx +++ b/desktop/packages/mullvad-vpn/src/renderer/components/NotificationArea.tsx @@ -254,11 +254,11 @@ function NotificationActionWrapper({ const handleClick = useCallback(() => { if (action) { switch (action.type) { - case 'open-url': - if (action.withAuth) { - return openUrlWithAuth(action.url); + case 'navigate-external': + if (action.link.withAuth) { + return openUrlWithAuth(action.link.to); } else { - return openUrl(action.url); + return openUrl(action.link.to); } case 'troubleshoot-dialog': setIsModalOpen(true); @@ -280,7 +280,7 @@ function NotificationActionWrapper({ let actionComponent: React.ReactElement | undefined; if (action) { switch (action.type) { - case 'open-url': + case 'navigate-external': actionComponent = <NotificationOpenLinkAction onClick={handleClick} />; break; case 'troubleshoot-dialog': |
