mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-02-11 17:55: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
|
||||
|
||||
export const MessageDisplay = ({ htmlContent }) => {
|
||||
|
||||
const linkify = (text) => {
|
||||
// Regular expression to find URLs starting with https://, http://, or www.
|
||||
const urlPattern = /(\bhttps?:\/\/[^\s<]+|\bwww\.[^\s<]+)/g;
|
||||
|
||||
// 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}`;
|
||||
return `<a href="${href}" class="auto-link">${DOMPurify.sanitize(url)}</a>`;
|
||||
});
|
||||
|
@ -762,6 +762,7 @@ export const Group = ({
|
||||
const getMembers = async (groupId) => {
|
||||
try {
|
||||
const res = await getGroupMembers(groupId);
|
||||
if(groupId !== selectedGroupRef.current?.groupId) return
|
||||
setMembers(res);
|
||||
} catch (error) {}
|
||||
};
|
||||
@ -773,7 +774,6 @@ export const Group = ({
|
||||
}, [selectedGroup?.groupId]);
|
||||
|
||||
const shouldReEncrypt = useMemo(() => {
|
||||
|
||||
if (triedToFetchSecretKey && !secretKeyPublishDate) return true;
|
||||
if (
|
||||
!secretKeyPublishDate ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user