"use client"; import { useState, useTransition } from "react"; import { formatBytes } from "yt-dlp-transcript-common/lib/format"; import { MediaPlayer } from "../MediaPlayer"; import { TextFilePreview } from "../TextFilePreview"; import { deleteVideoFileAction, } from "../../videoActions"; import { mediaKind, mediaUrl, type VideoFile } from "./videoFiles"; export function FilesList({ slug, videoId, files, }: { slug: string; videoId: string; files: VideoFile[]; }) { if (files.length === 0) { return

Directory is empty.

; } return ( ); } function DeleteFileButton({ slug, videoId, filename, }: { slug: string; videoId: string; filename: string; }) { const [pending, startTransition] = useTransition(); const [error, setError] = useState(null); return (
{error && ( {error} )}
); }