Skip to content

Commit

Permalink
All proptypes replaced with external lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Carlino committed Sep 14, 2018
1 parent 6fefd64 commit 6afd7de
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
3 changes: 2 additions & 1 deletion client/src/components/IntroScreen/IntroScreen.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import i18n from 'i18n';
import CONSTANTS from 'constants/index';

Expand Down
3 changes: 2 additions & 1 deletion client/src/containers/CampaignAdmin/CampaignAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import CampaignAdminList from './CampaignAdminList';
import IntroScreen from 'components/IntroScreen/IntroScreen';
import ResizeAware from 'react-resize-aware';
import * as viewModeActions from 'state/viewMode/ViewModeActions';
import PropTypes from 'prop-types';


const sectionConfigKey = 'SilverStripe\\CampaignAdmin\\CampaignAdmin';
Expand Down Expand Up @@ -504,7 +505,7 @@ CampaignAdmin.propTypes = {
}),
showMessage: PropTypes.bool,
previewState: PropTypes.oneOf(['edit', 'preview', 'split']),
onResize: React.PropTypes.func.isRequired,
onResize: PropTypes.func.isRequired,
};

CampaignAdmin.defaultProps = {
Expand Down
7 changes: 4 additions & 3 deletions client/src/containers/CampaignAdmin/CampaignAdminItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Component } from 'react';
import i18n from 'i18n';
import { UncontrolledTooltip } from 'reactstrap';
import formatWrittenNumber from 'lib/formatWrittenNumber';
import PropTypes from 'prop-types';

/**
* Describes an individual campaign item
Expand Down Expand Up @@ -162,9 +163,9 @@ class CampaignAdminItem extends Component {
}

CampaignAdminItem.propTypes = {
campaign: React.PropTypes.object.isRequired,
item: React.PropTypes.object.isRequired,
isLinked: React.PropTypes.bool,
campaign: PropTypes.object.isRequired,
item: PropTypes.object.isRequired,
isLinked: PropTypes.bool,
};

export default CampaignAdminItem;
29 changes: 15 additions & 14 deletions client/src/containers/CampaignAdmin/CampaignAdminList.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { DropdownItem } from 'reactstrap';
import i18n from 'i18n';
import { inject } from 'lib/Injector';
import classNames from 'classnames';
import PropTypes from 'prop-types';

/**
* Represents a campaign list view
Expand Down Expand Up @@ -520,22 +521,22 @@ class CampaignAdminList extends Component {
}

CampaignAdminList.propTypes = {
campaign: React.PropTypes.shape({
isPublishing: React.PropTypes.bool,
changeSetItemId: React.PropTypes.number,
campaign: PropTypes.shape({
isPublishing: PropTypes.bool,
changeSetItemId: PropTypes.number,
}),
publishApi: React.PropTypes.func.isRequired,
record: React.PropTypes.object.isRequired,
sectionConfig: React.PropTypes.object.isRequired,
onBackButtonClick: React.PropTypes.func,
onRemoveCampaignItem: React.PropTypes.func,
breadcrumbsActions: React.PropTypes.object.isRequired,
campaignActions: React.PropTypes.object.isRequired,
recordActions: React.PropTypes.object.isRequired,
PreviewComponent: React.PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
ViewModeComponent: React.PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
publishApi: PropTypes.func.isRequired,
record: PropTypes.object.isRequired,
sectionConfig: PropTypes.object.isRequired,
onBackButtonClick: PropTypes.func,
onRemoveCampaignItem: PropTypes.func,
breadcrumbsActions: PropTypes.object.isRequired,
campaignActions: PropTypes.object.isRequired,
recordActions: PropTypes.object.isRequired,
PreviewComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
ViewModeComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
FormActionComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
previewState: React.PropTypes.oneOf(['edit', 'preview', 'split']),
previewState: PropTypes.oneOf(['edit', 'preview', 'split']),
};

CampaignAdminList.defaultProps = {
Expand Down

0 comments on commit 6afd7de

Please sign in to comment.