diff --git a/apps/web/src/components/editor/media-panel.tsx b/apps/web/src/components/editor/media-panel.tsx index 3d83426..73ac0ad 100644 --- a/apps/web/src/components/editor/media-panel.tsx +++ b/apps/web/src/components/editor/media-panel.tsx @@ -4,7 +4,7 @@ import { useDragDrop } from "@/hooks/use-drag-drop"; import { processMediaFiles } from "@/lib/media-processing"; import { useMediaStore, type MediaItem } from "@/stores/media-store"; import { useTimelineStore } from "@/stores/timeline-store"; -import { Image, Music, Plus, Upload, Video } from "lucide-react"; +import { Image, Music, MusicIcon, Plus, TextIcon, Upload, Video, VideoIcon } from "lucide-react"; import { useEffect, useRef, useState } from "react"; import { toast } from "sonner"; import { AspectRatio } from "../ui/aspect-ratio"; @@ -24,6 +24,7 @@ import { SelectTrigger, SelectValue, } from "../ui/select"; +import { cn } from "@/lib/utils"; // MediaPanel lets users add, view, and drag media (images, videos, audio) into the project. // You can upload files or drag them from your computer. Dragging from here to the timeline adds them to your video project. @@ -137,12 +138,6 @@ export function MediaPanel() { const renderPreview = (item: MediaItem) => { // Render a preview for each media type (image, video, audio, unknown) - // Each preview is draggable to the timeline - const baseDragProps = { - draggable: true, - onDragStart: (e: React.DragEvent) => startDrag(e, item), - }; - if (item.type === "image") { return (
@@ -151,7 +146,6 @@ export function MediaPanel() { alt={item.name} className="max-w-full max-h-full object-contain rounded" loading="lazy" - {...baseDragProps} />
); @@ -160,7 +154,7 @@ export function MediaPanel() { if (item.type === "video") { if (item.thumbnailUrl) { return ( -
+
{item.name} +