26 lines
584 B
TypeScript
26 lines
584 B
TypeScript
import React from 'react';
|
|
import { PriceListItem } from './price-list-item/price-list-item';
|
|
|
|
interface IProps {
|
|
data: any[];
|
|
}
|
|
|
|
export class PriceList extends React.Component<IProps, any> {
|
|
constructor(props: IProps) {
|
|
super(props);
|
|
}
|
|
|
|
// componentDidMount() {
|
|
// console.log(this.props.data);
|
|
// }
|
|
|
|
// componentWillReceiveProps(nextProps: IProps) {
|
|
// if (this.props !== nextProps) {
|
|
// // do stuff
|
|
// console.log(nextProps);
|
|
// }
|
|
// }
|
|
|
|
render = () => this.props.data.map((value, index) => <PriceListItem data={value} key={index} />);
|
|
}
|