Skip to content

Commit 800babb

Browse files
committed
privateNav add the NoMatch
1 parent 03c54a5 commit 800babb

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/components/ContentMain/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React,{Component} from 'react';
2-
import {Switch,withRouter} from 'react-router-dom';
2+
import {Switch,withRouter,Route} from 'react-router-dom';
33
import PrivateRoute from '../../router/PrivateRoute';
44
import DataChart from '../../views/DataChart';
55
import Basic from '../../views/Basic';
@@ -10,6 +10,7 @@ import Spin from '../../views/Spin';
1010
import Progress from '../../views/Progress';
1111
import Checkbox from '../../views/Checkbox';
1212
import Cascader from '../../views/Cascader';
13+
import NoMatch from '../../views/NoMatch';
1314
import './index.css';
1415
class ContentMain extends Component{
1516
render(){
@@ -25,6 +26,7 @@ class ContentMain extends Component{
2526
<PrivateRoute path="/progress" exact component = {Progress}/>
2627
<PrivateRoute path="/checkbox" exact component = {Checkbox}/>
2728
<PrivateRoute path="/cascader" exact component = {Cascader}/>
29+
<Route component={NoMatch}/>
2830
</Switch>
2931
</div>
3032
)

src/views/NoMatch/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
align-items: center;
66
width: 100%;
77
height: 100%;
8+
min-height: 45rem;
89
}
910
.notFound .notFoundIcon {
1011
width: 35%;

0 commit comments

Comments
 (0)