diff --git a/js/components/prop_types/current_user_shape.js b/js/components/prop_types/current_user_shape.js index 5735f384..d854450b 100644 --- a/js/components/prop_types/current_user_shape.js +++ b/js/components/prop_types/current_user_shape.js @@ -3,10 +3,15 @@ import React from 'react'; const { number, object, shape, string } = React.PropTypes; -export default shape({ +const currentUserShapeSpec = { acl: object, email: string, id: number, profile: object, username: string -}); +}; + +export default shape(currentUserShapeSpec); +export { + currentUserShapeSpec +}; diff --git a/js/components/prop_types/index.js b/js/components/prop_types/index.js index e5f818dd..5b69a304 100644 --- a/js/components/prop_types/index.js +++ b/js/components/prop_types/index.js @@ -1,5 +1,5 @@ -export { default as currentUserShape } from './current_user_shape'; -export { default as whitelabelShape } from './whitelabel_shape'; +export currentUserShape from './current_user_shape'; +export whitelabelShape from './whitelabel_shape'; // Re-export PropTypes from react-router export { locationShape, routerShape } from 'react-router/es6/PropTypes'; diff --git a/js/components/prop_types/whitelabel_shape.js b/js/components/prop_types/whitelabel_shape.js index 72f8bc36..63c5b1a8 100644 --- a/js/components/prop_types/whitelabel_shape.js +++ b/js/components/prop_types/whitelabel_shape.js @@ -3,9 +3,14 @@ import React from 'react'; const { shape, string } = React.PropTypes; -export default shape({ +const whitelabelShapeSpec = { name: string, subdomain: string, title: string, user: string -}); +}; + +export default shape(whitelabelShapeSpec); +export { + whitelabelShapeSpec +};