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 (
+
+ +

{title}

{t('Subtitle label')}

@@ -119,7 +132,7 @@ export default function CustomVideoSubMenu({ key={JSON.stringify({ track, index })} track={track} index={index} - setTracks={setTracks} + setTracks={setPendingTracks} title={`#${index}`} /> ))} diff --git a/pages/_app.tsx b/pages/_app.tsx index a9599b4cbc..14d7418f37 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -21,6 +21,7 @@ import { faEnvelope, faFlag, faCheckCircle, + faTimesCircle, } from '@fortawesome/free-regular-svg-icons' import { faSearch, @@ -110,6 +111,7 @@ library.add( faThList, faLanguage, faPen, + faTimesCircle, ...iconList )