title | toc | order |
---|---|---|
Route Permission |
false |
1 |
This example demonstrates some of the basic features of React Router, you will need to implement basic route permission control and have to meet the requirements
-
Introduce two type of user, Admin and User, you may need to change
-
Without login, all users can only view and visit
<Home>
and<About>
-
Addtional, both
<Home>
and<About>
don't embaded in Layout -
After login, Admin can view and visit all pages except
<Protected>
-
User can view and visit all pages except
<Dashboard>
-
Just Fake the API
-
Function works as expect
-
Stylesheet is good, but not the point here
-
Bonus: Refactor code, file or folder