2016-12-03 15:54:15 +01:00
|
|
|
import React, { Component } from 'react';
|
2018-02-04 14:32:33 +01:00
|
|
|
import PropTypes from 'prop-types';
|
2017-02-14 12:11:18 +01:00
|
|
|
import { ProgressBar, Card } from 'react-mdl';
|
2017-02-14 12:22:24 +01:00
|
|
|
import { AppsLinkList, styles as commonStyles } from '../common';
|
2016-12-03 15:54:15 +01:00
|
|
|
|
|
|
|
class ClientStrategies extends Component {
|
2018-02-04 14:32:33 +01:00
|
|
|
static propTypes = {
|
|
|
|
applications: PropTypes.array,
|
|
|
|
fetchAll: PropTypes.func.isRequired,
|
|
|
|
};
|
|
|
|
|
2017-08-28 19:15:47 +02:00
|
|
|
componentDidMount() {
|
2016-12-05 15:15:01 +01:00
|
|
|
this.props.fetchAll();
|
2016-12-03 15:54:15 +01:00
|
|
|
}
|
|
|
|
|
2017-08-28 19:15:47 +02:00
|
|
|
render() {
|
|
|
|
const { applications } = this.props;
|
2016-12-03 15:54:15 +01:00
|
|
|
|
2016-12-05 15:15:01 +01:00
|
|
|
if (!applications) {
|
2016-12-10 14:19:52 +01:00
|
|
|
return <ProgressBar indeterminate />;
|
2016-12-05 15:15:01 +01:00
|
|
|
}
|
2016-12-03 15:54:15 +01:00
|
|
|
return (
|
2017-02-14 12:11:18 +01:00
|
|
|
<Card className={commonStyles.fullwidth}>
|
|
|
|
<AppsLinkList apps={applications} />
|
|
|
|
</Card>
|
2016-12-03 15:54:15 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ClientStrategies;
|