From 65f38a90c2630669aef2706ba6783fc7ebb7ac00 Mon Sep 17 00:00:00 2001 From: PhilReact Date: Thu, 14 Nov 2024 06:28:55 +0200 Subject: [PATCH] fix link --- src/components/Chat/MessageDisplay.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Chat/MessageDisplay.tsx b/src/components/Chat/MessageDisplay.tsx index 12308b1..85013d8 100644 --- a/src/components/Chat/MessageDisplay.tsx +++ b/src/components/Chat/MessageDisplay.tsx @@ -2,6 +2,7 @@ import React, { useEffect } from 'react'; import DOMPurify from 'dompurify'; import './styles.css'; import { executeEvent } from '../../utils/events'; +import { Browser } from '@capacitor/browser'; const extractComponents = (url) => { if (!url || !url.startsWith("qortal://")) { // Check if url exists and starts with "qortal://" @@ -86,7 +87,7 @@ export const MessageDisplay = ({ htmlContent, isReply }) => { const target = e.target; if (target.tagName === 'A') { const href = target.getAttribute('href'); - window.electronAPI.openExternal(href); + window.open(href, '_system'); } else if (target.getAttribute('data-url')) { const url = target.getAttribute('data-url'); const res = extractComponents(url);