diff --git a/src/components/note/preview/messageImage.tsx b/src/components/note/preview/messageImage.tsx
deleted file mode 100644
index 1ed79684..00000000
--- a/src/components/note/preview/messageImage.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import Image from 'next/image';
-import { memo } from 'react';
-
-export const MessageImagePreview = memo(function MesssageImagePreview({ url }: { url: string }) {
- return (
-
-
-
- );
-});
diff --git a/src/components/note/preview/video.tsx b/src/components/note/preview/video.tsx
index 6f5b9878..34508fbd 100644
--- a/src/components/note/preview/video.tsx
+++ b/src/components/note/preview/video.tsx
@@ -3,7 +3,7 @@ import ReactPlayer from 'react-player/lazy';
export const VideoPreview = memo(function VideoPreview({ url }: { url: string }) {
return (
-
e.stopPropagation()} className="relative mt-3 flex flex-col overflow-hidden rounded-lg">
+
e.stopPropagation()} className="relative flex flex-col overflow-hidden rounded-lg">
{
parsedContent = reactStringReplace(parsedContent, /(https?:\/\/\S+)/g, (match, i) => {
if (match.match(/\.(jpg|jpeg|gif|png|webp)$/i)) {
// image url
- return ;
+ return ;
} else if (match.match(/(www\.)?(youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]{11})/i)) {
// youtube
return ;
@@ -62,7 +61,7 @@ export const messageParser = (noteContent) => {
parsedContent = reactStringReplace(parsedContent, /(https?:\/\/\S+)/g, (match, i) => {
if (match.match(/\.(jpg|jpeg|gif|png|webp)$/i)) {
// image url
- return ;
+ return ;
} else if (match.match(/(www\.)?(youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]{11})/i)) {
// youtube
return ;