File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -128,12 +128,24 @@ export const routes: IRoutesConfig = {
128128 } ,
129129 {
130130 path : '/common' ,
131- component : < h1 > Common page</ h1 > ,
131+ component : (
132+ < >
133+ common page layout < Outlet />
134+ </ >
135+ ) ,
132136 children : [
137+ {
138+ index : true ,
139+ component : < h1 > Common page</ h1 > ,
140+ } ,
133141 {
134142 path : 'nested' ,
135- component : < h1 > a nested common path </ h1 > ,
143+ component : < Outlet / >,
136144 children : [
145+ {
146+ index : true ,
147+ component : < h1 > a nested common path</ h1 > ,
148+ } ,
137149 {
138150 path : 'more' ,
139151 component : < h1 > need more ?</ h1 > ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { RouterContext } from '../context/context';
1111 * @returns [boolean]
1212 */
1313export const useRole = (
14- path : string ,
14+ path ? : string ,
1515 routeRoles ?: string [ ] ,
1616 allRolesRequired ?: boolean ,
1717) => {
@@ -34,7 +34,7 @@ export const useRole = (
3434} ;
3535
3636const checkRole = (
37- path : string ,
37+ path ? : string ,
3838 routeRoles ?: string [ ] ,
3939 userRole ?: string [ ] | string ,
4040 allRolesRequired ?: boolean ,
You can’t perform that action at this time.
0 commit comments