diff --git a/components/CustomVideoSubMenu.tsx b/components/CustomVideoSubMenu.tsx index 7f3e87d19e..018ebc54e0 100644 --- a/components/CustomVideoSubMenu.tsx +++ b/components/CustomVideoSubMenu.tsx @@ -1,6 +1,7 @@ import { Dispatch, Fragment, SetStateAction, useEffect, useState } from 'react' import { useTranslation } from 'next-i18next' import { Dialog, Transition } from '@headlessui/react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { DownloadButton } from './DownloadBtnGtoup' function TrackContainer({ @@ -20,8 +21,20 @@ function TrackContainer({ tracks[index] = value return [...tracks] }) + const delTrack = () => { + setTracks(tracks => { + tracks.splice(index, 1) + return [...tracks] + }) + } return (