Youtube music and video downloader

Links.jsx 668B

123456789101112131415161718192021222324
  1. import React from 'react';
  2. import { createContainer } from 'meteor/react-meteor-data';
  3. import Link from './Link';
  4. import Video from './Video';
  5. const Links = ({ links, remove, handlers }) =>
  6. <ul>
  7. { links.map(link => (
  8. <Link key={link.id} converted_id={link.converted}
  9. link={link} options={handlers}
  10. remove={() => remove(link)}/>
  11. )) }
  12. </ul>;
  13. Links.propTypes = {
  14. links: React.PropTypes.arrayOf(React.PropTypes.instanceOf(Video)).isRequired,
  15. remove: React.PropTypes.func.isRequired,
  16. handlers: React.PropTypes.arrayOf(React.PropTypes.shape({
  17. type: React.PropTypes.string,
  18. handler: React.PropTypes.func
  19. })).isRequired
  20. };
  21. export default Links;