mirror of
https://github.com/Qortal/qortal-mobile.git
synced 2025-03-14 20:02:33 +00:00
fix link
This commit is contained in:
parent
6cf6da90df
commit
65f38a90c2
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user