mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 04:16:24 -05:00
Multiple videos can be deleted using Videos list view.
This commit is contained in:
parent
69e899e032
commit
00acd9d891
7 changed files with 79 additions and 23 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React, {useContext, useState} from 'react';
|
||||
import {deleteVideo, favoriteVideo} from "../api";
|
||||
import {deleteVideos, favoriteVideo} from "../api";
|
||||
import {Link, useNavigate, useParams} from "react-router-dom";
|
||||
import {humanFileSize, humanNumber, PageContainer, secondsToTimestamp, uploadDate, useTitle, VideoCard} from "./Common";
|
||||
import {Confirm} from "semantic-ui-react";
|
||||
|
|
@ -40,7 +40,7 @@ function VideoPage({videoFile, prevFile, nextFile, ...props}) {
|
|||
|
||||
const handleDeleteVideo = async (video_id) => {
|
||||
try {
|
||||
await deleteVideo(video_id)
|
||||
await deleteVideos(video_id)
|
||||
} catch (e) {
|
||||
setDeleteOpen(false);
|
||||
throw e;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue