This commit introduces a new component `AuthRedirect` which checks if a user is already logged in. If the user is logged in and attempts to access the /login or /register pages, they will be redirected to the /console page. Otherwise, the respective authentication form (Login or Register) will be rendered. The `App.js` file has been updated to utilize this new `AuthRedirect` component for the /login and /register routes.
React Template
Basic Usages
# Runs the app in the development mode
npm start
# Builds the app for production to the `build` folder
npm run build
If you want to change the default server, please set REACT_APP_SERVER environment variables before build,
for example: REACT_APP_SERVER=http://your.domain.com.
Before you start editing, make sure your Actions on Save options have Optimize imports & Run Prettier enabled.