mirror of
https://github.com/Qortal/qortal-mobile.git
synced 2025-03-28 16:25:54 +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 DOMPurify from 'dompurify';
|
||||||
import './styles.css';
|
import './styles.css';
|
||||||
import { executeEvent } from '../../utils/events';
|
import { executeEvent } from '../../utils/events';
|
||||||
|
import { Browser } from '@capacitor/browser';
|
||||||
|
|
||||||
const extractComponents = (url) => {
|
const extractComponents = (url) => {
|
||||||
if (!url || !url.startsWith("qortal://")) { // Check if url exists and starts with "qortal://"
|
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;
|
const target = e.target;
|
||||||
if (target.tagName === 'A') {
|
if (target.tagName === 'A') {
|
||||||
const href = target.getAttribute('href');
|
const href = target.getAttribute('href');
|
||||||
window.electronAPI.openExternal(href);
|
window.open(href, '_system');
|
||||||
} else if (target.getAttribute('data-url')) {
|
} else if (target.getAttribute('data-url')) {
|
||||||
const url = target.getAttribute('data-url');
|
const url = target.getAttribute('data-url');
|
||||||
const res = extractComponents(url);
|
const res = extractComponents(url);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user