From ffd4b8930850df1523dec00ce2f9884eb62746b5 Mon Sep 17 00:00:00 2001 From: "[dyad]" Date: Fri, 30 Jan 2026 08:08:01 +0100 Subject: [PATCH] [dyad] Create video editor UI - wrote 2 file(s), deleted 1 file(s) --- src/app/page.tsx | 11 ++-- src/components/made-with-dyad.tsx | 14 ----- src/components/video-editor.tsx | 90 +++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 20 deletions(-) delete mode 100644 src/components/made-with-dyad.tsx create mode 100644 src/components/video-editor.tsx diff --git a/src/app/page.tsx b/src/app/page.tsx index 0d42a08..d12ec39 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,12 +1,11 @@ -import { MadeWithDyad } from "@/components/made-with-dyad"; +import { VideoEditor } from "@/components/video-editor"; export default function Home() { return ( -
-
-

Blank page

+
+
+
-
); -} +} \ No newline at end of file diff --git a/src/components/made-with-dyad.tsx b/src/components/made-with-dyad.tsx deleted file mode 100644 index c0c2ef8..0000000 --- a/src/components/made-with-dyad.tsx +++ /dev/null @@ -1,14 +0,0 @@ -export const MadeWithDyad = () => { - return ( -
- - Made with Dyad - -
- ); -}; diff --git a/src/components/video-editor.tsx b/src/components/video-editor.tsx new file mode 100644 index 0000000..fb77238 --- /dev/null +++ b/src/components/video-editor.tsx @@ -0,0 +1,90 @@ +"use client"; + +import { useState, useRef, ChangeEvent } from "react"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle, CardFooter } from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { UploadCloud, Scissors, Download } from "lucide-react"; + +export function VideoEditor() { + const [videoSrc, setVideoSrc] = useState(null); + const [videoFile, setVideoFile] = useState(null); + const videoRef = useRef(null); + + const handleFileChange = (event: ChangeEvent) => { + const file = event.target.files?.[0]; + if (file) { + setVideoFile(file); + const url = URL.createObjectURL(file); + setVideoSrc(url); + } + }; + + return ( + + + + Video Clip Cutter + + + Upload, trim, and export your video in seconds. + + + + {videoSrc ? ( +
+
+
+
+

Trim Video

+

+ Trimming controls will be added here in the next step. +

+
+
+ ) : ( +
+ +
+ )} +
+ {videoSrc && ( + + + + + )} +
+ ); +} \ No newline at end of file