File tree Expand file tree Collapse file tree 5 files changed +18
-13
lines changed
Expand file tree Collapse file tree 5 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 11import * as React from 'react' ;
2+ import * as PropTypes from 'prop-types' ;
23import { jsxInstanceOf } from './helpers' ;
34import * as Route from './route' ;
45import * as Redirect from './redirect' ;
@@ -12,16 +13,16 @@ export interface State {
1213
1314export default class Middleware extends React . Component < Props , State > {
1415 static propTypes = {
15- children : React . PropTypes . oneOfType ( [
16+ children : PropTypes . oneOfType ( [
1617 jsxInstanceOf ( Route ) ,
1718 jsxInstanceOf ( Redirect ) ,
18- React . PropTypes . arrayOf ( React . PropTypes . oneOfType ( [
19+ PropTypes . arrayOf ( PropTypes . oneOfType ( [
1920 jsxInstanceOf ( Route ) ,
2021 jsxInstanceOf ( Redirect )
2122 ] ) )
2223 ] ) . isRequired ,
23- path : React . PropTypes . string . isRequired ,
24- action : React . PropTypes . func
24+ path : PropTypes . string . isRequired ,
25+ action : PropTypes . func
2526 } ;
2627 render ( ) {
2728 const childs = Array . isArray ( this . props . children ? this . props . children : [ this . props . children ] ) ;
Original file line number Diff line number Diff line change 11import * as React from 'react' ;
2+ import * as PropTypes from 'prop-types' ;
23import Router from './router' ;
34
45export interface Props {
@@ -16,7 +17,7 @@ export interface Context {
1617export default class Placeholder extends React . Component < Props , State > {
1718 context : Context ;
1819 static contextTypes = {
19- router : React . PropTypes . object . isRequired
20+ router : PropTypes . object . isRequired
2021 } ;
2122 constructor ( { Component, componentProps } ) {
2223 super ( ) ;
Original file line number Diff line number Diff line change 11import * as React from 'react' ;
2+ import * as PropTypes from 'prop-types' ;
23
34export interface Props {
45 [ propName : string ] : any ;
@@ -9,9 +10,9 @@ export interface State {
910
1011export default class Redirect extends React . Component < Props , State > {
1112 static propTypes = {
12- path : React . PropTypes . string . isRequired ,
13- to : React . PropTypes . string . isRequired ,
14- status : React . PropTypes . oneOf ( [ 301 , 302 ] )
13+ path : PropTypes . string . isRequired ,
14+ to : PropTypes . string . isRequired ,
15+ status : PropTypes . oneOf ( [ 301 , 302 ] )
1516 } ;
1617 static defaultProps = {
1718 status : 302
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { jsxInstanceOf } from './helpers';
33import * as Route from './route' ;
44import * as Middleware from './middleware' ;
55import * as Redirect from './redirect' ;
6+ import * as PropTypes from 'prop-types' ;
67
78export interface Props {
89 [ propName : string ] : any ;
@@ -13,11 +14,11 @@ export interface State {
1314
1415export default class RootRoute extends React . Component < Props , State > {
1516 static propTypes = {
16- children : React . PropTypes . oneOfType ( [
17+ children : PropTypes . oneOfType ( [
1718 jsxInstanceOf ( Route ) ,
1819 jsxInstanceOf ( Middleware ) ,
1920 jsxInstanceOf ( Redirect ) ,
20- React . PropTypes . arrayOf ( React . PropTypes . oneOfType ( [
21+ PropTypes . arrayOf ( PropTypes . oneOfType ( [
2122 jsxInstanceOf ( Route ) ,
2223 jsxInstanceOf ( Middleware ) ,
2324 jsxInstanceOf ( Redirect )
Original file line number Diff line number Diff line change 11import * as React from 'react' ;
2+ import * as PropTypes from 'prop-types' ;
23
34export interface Props {
45 [ propName : string ] : any ;
@@ -9,9 +10,9 @@ export interface State {
910
1011export default class Route extends React . Component < Props , State > {
1112 static propTypes = {
12- path : React . PropTypes . string . isRequired ,
13- action : React . PropTypes . func . isRequired ,
14- status : React . PropTypes . oneOf ( [ 200 , 404 , 500 ] )
13+ path : PropTypes . string . isRequired ,
14+ action : PropTypes . func . isRequired ,
15+ status : PropTypes . oneOf ( [ 200 , 404 , 500 ] )
1516 } ;
1617 render ( ) {
1718 console . error ( 'Route can\'t render' ) ;
You can’t perform that action at this time.
0 commit comments