This repository has been archived on 2025-09-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
repertory-ui/src/components/DependencyList/Dependency/Dependency.js

36 lines
942 B
JavaScript

import React from 'react';
import './Dependency.css';
import {connect} from 'react-redux';
import * as Constants from '../../../constants';
const mapStateToProps = state => {
return {
AllowDownload: (state.download.DownloadType !== Constants.INSTALL_TYPES.Dependency) &&
!state.download.DownloadActive &&
!state.install.InstallActive,
};
};
export default connect(mapStateToProps)(props => {
return (
<div className={'Dependency'}>
<table width="100%">
<tbody>
<tr>
<td width="35%">
<h3>{props.name}</h3>
</td>
<td>
{props.AllowDownload ?
<a href={'#'}
className={'DependencyLink'}
onClick={()=>{props.onDownload(); return false;}}><u>Install</u></a> :
'Installing...'}
</td>
</tr>
</tbody>
</table>
</div>
);
});