import React, { ChangeEvent } from 'react'; import FormControl from 'react-bootstrap/FormControl'; import InputGroup from 'react-bootstrap/InputGroup'; import ListGroup from 'react-bootstrap/ListGroup'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { injectIntl, IntlShape } from 'react-intl'; import VideoListItem from './VideoListItem'; import Filter from './Filter'; import { VideoEntry } from '../util/datatypes/VideoList'; interface VideoListProps { intl: IntlShape, id: string, thumbnailServerURL: string, videos: Array, } interface VideoListState { query: string } class VideoList extends React.Component { constructor(props: VideoListProps) { super(props); this.state = { query: '', }; this.onQueryChange = this.onQueryChange.bind(this); } onQueryChange({ target }: ChangeEvent) { this.setState({ query: target.value, }); } render() { const { query } = this.state; const { intl, id, thumbnailServerURL, videos, } = this.props; return (
filteredVideos.map(({ item: { duration, fileName, title, sourceVideoStart, sourceVideoEnd, }, refIndex: index, }) => ( ))} />
); } } export default injectIntl(VideoList);