import React, {Component} from 'react';
import NextActionItem from './NextActionItem';
import {WiaasTable, WiaasTableBody} from '../../../mainComponents/table/WiaasTable.jsx';

class NextActionsList extends Component {

    render() {
        const {nextActions} = this.props;

        return (
            <div>
                <WiaasTable>
                    <WiaasTableBody>
                        {
                            nextActions &&
                            nextActions.map((nextAction, index) =>
                                <NextActionItem key={'action-' + nextAction.order_number + index} nextAction={nextAction}/>
                             )
                        }
                    </WiaasTableBody>
                </WiaasTable>
            </div>
        );
    }
}

export default NextActionsList;
