mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-02-14 11:15:49 +00:00
bug fix
This commit is contained in:
parent
7c8c6eaba3
commit
1130628302
@ -3,12 +3,13 @@ import DOMPurify from 'dompurify';
|
|||||||
import './styles.css'; // Ensure this CSS file is imported
|
import './styles.css'; // Ensure this CSS file is imported
|
||||||
|
|
||||||
export const MessageDisplay = ({ htmlContent }) => {
|
export const MessageDisplay = ({ htmlContent }) => {
|
||||||
|
|
||||||
const linkify = (text) => {
|
const linkify = (text) => {
|
||||||
// Regular expression to find URLs starting with https://, http://, or www.
|
// Regular expression to find URLs starting with https://, http://, or www.
|
||||||
const urlPattern = /(\bhttps?:\/\/[^\s<]+|\bwww\.[^\s<]+)/g;
|
const urlPattern = /(\bhttps?:\/\/[^\s<]+|\bwww\.[^\s<]+)/g;
|
||||||
|
|
||||||
// Replace plain text URLs with anchor tags
|
// Replace plain text URLs with anchor tags
|
||||||
return text.replace(urlPattern, (url) => {
|
return text?.replace(urlPattern, (url) => {
|
||||||
const href = url.startsWith('http') ? url : `https://${url}`;
|
const href = url.startsWith('http') ? url : `https://${url}`;
|
||||||
return `<a href="${href}" class="auto-link">${DOMPurify.sanitize(url)}</a>`;
|
return `<a href="${href}" class="auto-link">${DOMPurify.sanitize(url)}</a>`;
|
||||||
});
|
});
|
||||||
|
@ -762,6 +762,7 @@ export const Group = ({
|
|||||||
const getMembers = async (groupId) => {
|
const getMembers = async (groupId) => {
|
||||||
try {
|
try {
|
||||||
const res = await getGroupMembers(groupId);
|
const res = await getGroupMembers(groupId);
|
||||||
|
if(groupId !== selectedGroupRef.current?.groupId) return
|
||||||
setMembers(res);
|
setMembers(res);
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
};
|
};
|
||||||
@ -773,7 +774,6 @@ export const Group = ({
|
|||||||
}, [selectedGroup?.groupId]);
|
}, [selectedGroup?.groupId]);
|
||||||
|
|
||||||
const shouldReEncrypt = useMemo(() => {
|
const shouldReEncrypt = useMemo(() => {
|
||||||
|
|
||||||
if (triedToFetchSecretKey && !secretKeyPublishDate) return true;
|
if (triedToFetchSecretKey && !secretKeyPublishDate) return true;
|
||||||
if (
|
if (
|
||||||
!secretKeyPublishDate ||
|
!secretKeyPublishDate ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user