1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *| IBM Cognos Products: Content Explorer
- *| (C) Copyright IBM Corp. 2015, 2018
- *|
- *| US Government Users Restricted Rights - Use, duplication or disclosure
- *| restricted by GSA ADP Schedule Contract with IBM Corp.
- *+------------------------------------------------------------------------+
- */
- import * as React from 'react';
- import PropTypes from 'prop-types';
- import ContentList from '../ContentList/ContentList';
- import ListUtils from '../../utils/ListUtils';
- class MyContent extends React.Component {
- static propTypes = {
- glassContext: PropTypes.object,
- rootSlideout: PropTypes.object,
- DateTimeUtils: PropTypes.object,
- l10n: PropTypes.object,
- i18nFormatter: PropTypes.object,
- contentView: PropTypes.object,
- contentType: PropTypes.string
- };
- constructor(props) {
- super(props);
- const options = {
- glassContext: props.glassContext
- };
- this.listUtils = new ListUtils(options);
- }
- render() {
- const { contentType } = this.props;
- const contentURL = contentType === 'myContent' ? this.listUtils.getMyContentURL() : this.listUtils.getTeamContentURL();
- return (
- <ContentList {...this.props} contentType={contentType} dataURL={contentURL}/>
- );
- }
- }
- export default MyContent;
|