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 }) => ( +