I am trying to create an new react app. I have 3 components: app (with login functionality) , admin and client.
- How can I render (redirect to) admin / client based on a value (user role) , after successfully login?
- Is this any way to access the admin / client components directly from the URL? More specific, localhost:3000 takes me to App.js (witch makes sense, because it is defined like this in index.js). If I want to see directly the admin component (hijacking the login), can I use for example localhost:3000/admin ? how can I do that?
Thank you !