mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Add .isRequired
to App proptypes
This commit is contained in:
parent
1dca764166
commit
315e5f0108
@ -18,11 +18,12 @@ import { mergeOptions } from '../utils/general_utils';
|
||||
|
||||
let AscribeApp = React.createClass({
|
||||
propTypes: {
|
||||
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
|
||||
|
||||
children: React.PropTypes.oneOfType([
|
||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
||||
React.PropTypes.element
|
||||
]),
|
||||
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
||||
])
|
||||
},
|
||||
|
||||
getInitialState() {
|
||||
|
@ -21,12 +21,13 @@ import { getCookie } from '../../../../utils/fetch_api_utils';
|
||||
|
||||
let PRApp = React.createClass({
|
||||
propTypes: {
|
||||
history: React.PropTypes.object.isRequired,
|
||||
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
|
||||
|
||||
children: React.PropTypes.oneOfType([
|
||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
||||
React.PropTypes.element
|
||||
]),
|
||||
history: React.PropTypes.object,
|
||||
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
||||
])
|
||||
},
|
||||
|
||||
getInitialState() {
|
||||
@ -54,7 +55,8 @@ let PRApp = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const { children, currentUser, history, routes, whitelabel } = this.props;
|
||||
const { children, history, routes } = this.props;
|
||||
const { currentUser, whitelabel } = this.state;
|
||||
const subdomain = getSubdomain();
|
||||
|
||||
// Add the current user and whitelabel settings to all child routes
|
||||
|
@ -20,12 +20,13 @@ import { getSubdomain, mergeOptions } from '../../../../utils/general_utils';
|
||||
|
||||
let PrizeApp = React.createClass({
|
||||
propTypes: {
|
||||
history: React.PropTypes.object.isRequired,
|
||||
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
|
||||
|
||||
children: React.PropTypes.oneOfType([
|
||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
||||
React.PropTypes.element
|
||||
]),
|
||||
history: React.PropTypes.object,
|
||||
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
||||
])
|
||||
},
|
||||
|
||||
getInitialState() {
|
||||
@ -53,7 +54,8 @@ let PrizeApp = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const { children, currentUser, history, routes, whitelabel } = this.props;
|
||||
const { children, history, routes } = this.props;
|
||||
const { currentUser, whitelabel } = this.state;
|
||||
const subdomain = getSubdomain();
|
||||
|
||||
// The second element of routes is always the active component object, where we can
|
||||
|
@ -19,12 +19,13 @@ import { getSubdomain, mergeOptions } from '../../../utils/general_utils';
|
||||
|
||||
let WalletApp = React.createClass({
|
||||
propTypes: {
|
||||
history: React.PropTypes.object.isRequired,
|
||||
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
|
||||
|
||||
children: React.PropTypes.oneOfType([
|
||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
||||
React.PropTypes.element
|
||||
]),
|
||||
history: React.PropTypes.object,
|
||||
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
||||
])
|
||||
},
|
||||
|
||||
getInitialState() {
|
||||
@ -38,6 +39,7 @@ let WalletApp = React.createClass({
|
||||
UserStore.listen(this.onChange);
|
||||
WhitelabelStore.listen(this.onChange);
|
||||
|
||||
console.log('fetch');
|
||||
UserActions.fetchCurrentUser();
|
||||
WhitelabelActions.fetchWhitelabel();
|
||||
},
|
||||
@ -52,7 +54,8 @@ let WalletApp = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
const { children, currentUser, history, routes, whitelabel } = this.props;
|
||||
const { children, history, routes } = this.props;
|
||||
const { currentUser, whitelabel } = this.state;
|
||||
const subdomain = getSubdomain();
|
||||
|
||||
// The second element of routes is always the active component object, where we can
|
||||
|
Loading…
Reference in New Issue
Block a user