casey-chow/tigertrade

View on GitHub
client/src/components/WatchesList.js

Summary

Maintainability
A
0 mins
Test Coverage
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';

import WatchCard from './WatchCard';
import ListContainer from './ListContainer';

export default class WatchesList extends PureComponent {
  static propTypes = {
    watches: PropTypes.arrayOf(PropTypes.shape({
      keyId: PropTypes.number,
    })).isRequired,
  };

  render() {
    return (
      <ListContainer>
        {this.props.watches.map(watch =>
          <WatchCard
            key={watch.keyId}
            watch={watch}
          />)
        }
      </ListContainer>
    );
  }
}