import React from "react"; function VideoModal({ submitFileLecture, chapterId }: any) { const [video, setVideo] = React.useState(null) as any; const [name, setName] = React.useState(""); const handleVideoChange = (event: React.ChangeEvent) => { setVideo(event.target.files[0]); }; const handleNameChange = (event: React.ChangeEvent) => { setName(event.target.value); }; const handleSubmit = async (e: any) => { e.preventDefault(); let status = await submitFileLecture(video, "video", { name, type: "video" }, chapterId); }; /* TODO : implement some sort of progress bar for file uploads, it is not possible yet because i'm not using axios. and the actual upload isn't happening here anyway, it's in the submitFileLecture function */ return (




); } export default VideoModal;