Skip to content

Commit

Permalink
make PropTypes required
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkvon committed Dec 5, 2018
1 parent 40d63fb commit 25540e7
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions modules/references/client/components/Info.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function UserLink({ user }) {
}

UserLink.propTypes = {
user: PropTypes.object
user: PropTypes.object.isRequired
};

export function Self() {
Expand All @@ -28,7 +28,7 @@ export function Duplicate({ userTo }) {
}

Duplicate.propTypes = {
userTo: PropTypes.object
userTo: PropTypes.object.isRequired
};

export function Submitted({ isReported, isPublic, userTo }) {
Expand Down Expand Up @@ -57,7 +57,7 @@ export function Submitted({ isReported, isPublic, userTo }) {
}

Submitted.propTypes = {
userTo: PropTypes.object,
isReported: PropTypes.bool,
isPublic: PropTypes.bool
userTo: PropTypes.object.isRequired,
isReported: PropTypes.bool.isRequired,
isPublic: PropTypes.bool.isRequired
};
4 changes: 2 additions & 2 deletions modules/references/client/components/Interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ export default function Interaction(props) {
}

Interaction.propTypes = {
onChange: PropTypes.func,
reference: PropTypes.object
onChange: PropTypes.func.isRequired,
reference: PropTypes.object.isRequired
};
12 changes: 6 additions & 6 deletions modules/references/client/components/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ export default function Navigation(props) {
}

Navigation.propTypes = {
onBack: PropTypes.func,
onNext: PropTypes.func,
onSubmit: PropTypes.func,
onBack: PropTypes.func.isRequired,
onNext: PropTypes.func.isRequired,
onSubmit: PropTypes.func.isRequired,
disabled: PropTypes.bool,
tab: PropTypes.number, // current tab index - indexed from 0
tabs: PropTypes.number, // amount of tabs to display
tabDone: PropTypes.number // which tab is already filled
tab: PropTypes.number.isRequired, // current tab index - indexed from 0
tabs: PropTypes.number.isRequired, // amount of tabs to display
tabDone: PropTypes.number.isRequired // which tab is already filled
};

12 changes: 6 additions & 6 deletions modules/references/client/components/Recommend.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ export default function Recommend(props) {
}

Recommend.propTypes = {
reference: PropTypes.object,
onChangeRecommend: PropTypes.func,
onChangeReport: PropTypes.func,
onChangeReportMessage: PropTypes.func,
report: PropTypes.bool,
reportMessage: PropTypes.string
reference: PropTypes.object.isRequired,
onChangeRecommend: PropTypes.func.isRequired,
onChangeReport: PropTypes.func.isRequired,
onChangeReportMessage: PropTypes.func.isRequired,
report: PropTypes.bool.isRequired,
reportMessage: PropTypes.string.isRequired
};
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,6 @@ export default class ReferencesNew extends React.Component {
}

ReferencesNew.propTypes = {
userFrom: PropTypes.object,
userTo: PropTypes.object
userFrom: PropTypes.object.isRequired,
userTo: PropTypes.object.isRequired
};
8 changes: 4 additions & 4 deletions modules/references/client/components/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default function Report(props) {
}

Report.propTypes = {
report: PropTypes.bool,
reportMessage: PropTypes.string,
onChangeReport: PropTypes.func,
onChangeReportMessage: PropTypes.func
report: PropTypes.bool.isRequired,
reportMessage: PropTypes.string.isRequired,
onChangeReport: PropTypes.func.isRequired,
onChangeReportMessage: PropTypes.func.isRequired
};

0 comments on commit 25540e7

Please sign in to comment.