From 32b39a94f1e21f80ce73ffa0786747aa22155859 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 13 Oct 2024 23:02:43 +0200 Subject: [PATCH] support for rumble embedded links --- .../ItemPopupComponents/TextView.tsx | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx index 80b41755..b0dbff05 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Item } from '../../../../types'; import { useTags } from '../../hooks/useTags'; import { useAddFilterTag } from '../../hooks/useFilter'; @@ -8,6 +7,7 @@ import Markdown from 'react-markdown'; import { getValue } from '../../../../Utils/GetValue'; import remarkBreaks from 'remark-breaks'; import { decodeTag } from '../../../../Utils/FormatTags'; +import { memo } from 'react'; export const TextView = ({ item, truncate = false, itemTextField, rawText }: { item?: Item, truncate?: boolean, itemTextField?: string, rawText?: string }) => { const tags = useTags(); @@ -103,21 +103,34 @@ export const TextView = ({ item, truncate = false, itemTextField, rawText }: { i ) }; + const MemoizedVideoEmbed = memo(({ url }: { url: string }) => ( +