Login detail for user
userId: john_1 password: test
userId: james_2 password: test
Project is build using create react app with typescript template.
Material UI is used as UI library.
Axios library is used for fetching api.
airbnb-eslint is used as a linter.
Testing is done using React test library
Intially user will be redirected to login page.
After user is logged in user will be redirected to dashboard component
On Dashboard component user role is checked
Depending on users role, different components are loaded in sidenav and main component of layout
Context api is used, to pass global Event Object which can read and modified by component easily
Testing is focused on checking if UI elements are rendered as expected
Project is divided in multiple folders, making it simple and extending it easy.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.