import * as React from "react"; import Config from "../../config"; import UnsubmittedVideoListItem from "./UnsubmittedVideoListItem"; export interface UnsubmittedVideoListProps { } export interface UnsubmittedVideoListState { } class UnsubmittedVideoListComponent extends React.Component { constructor(props: UnsubmittedVideoListProps) { super(props); // Setup state this.state = { }; } render(): React.ReactElement { // Render nothing if there are no unsubmitted segments if (Object.keys(Config.local.unsubmittedSegments).length == 0) return <>; return ( {/* Headers */} {this.getUnsubmittedVideos()}
{chrome.i18n.getMessage("videoID")} {chrome.i18n.getMessage("segmentCount")} {chrome.i18n.getMessage("actions")}
); } getUnsubmittedVideos(): JSX.Element[] { const elements: JSX.Element[] = []; for (const videoID of Object.keys(Config.local.unsubmittedSegments)) { elements.push( ); } return elements; } } export default UnsubmittedVideoListComponent;