feat: implement openExternalUrl utility for consistent external link handling

This commit is contained in:
2026-01-24 07:59:45 +11:00
parent c0af925420
commit a6b76a9be7
5 changed files with 29 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
import React, { MouseEventHandler, useCallback, useMemo, useState } from 'react';
import { openExternalUrl } from '../../utils/tauri';
import { useNavigate } from 'react-router-dom';
import FocusTrap from 'focus-trap-react';
import { isKeyHotkey } from 'is-hotkey';
@@ -110,7 +111,7 @@ export function ServerChip({ server }: { server: string }) {
size="300"
radii="300"
onClick={() => {
window.open(`https://${server}`, '_blank');
openExternalUrl(`https://${server}`);
close();
}}
>