import React, {Component} from 'react'; import WiaasBox from '../../../mainComponents/box/WiaasBox.jsx'; import {API_SERVER} from '../../../config'; import FileDownloader from '../../../helpers/FileDownloader'; const fileHandler = new FileDownloader(); class OrderDocumentsGroup extends Component { constructor(props) { super(props); this.state = {}; } downloadDocument(orderId, itemId, document){ const fileUrl = `${API_SERVER}/wp-json/wiaas/order/${orderId}/item/${itemId}/document/${document.key}`; fileHandler.download(fileUrl, `${document.name}.${document.extension}`); } render() { const {documentsGroup, orderId} = this.props; return (