I have my main route in my main component set like that
<Main>
<Switch>
<Route exact path="/login" component={ LoginPage }/>
<PrivateRoute path="/" component={ PrivatePages }/>
</Switch>
</Main>
and inside PrivatePages the routes are set like this
<div>
<Switch>
<Route exact path="/users/:id" component={ UsersPage }/>
</Switch>
</div>
when I'm accessing it like http://localhost:3000/users I see the right page (the UsersPage component) and when I click on a user it transfer to http://localhost:3000/users/someUserId (I'm doing it by using <Link>) and it works perfectly fine .. but when I refresh or trying to rich directly to a specific user's page I get a blank page which tries to load http://localhost:3000/users/main.js (I have no idea why it tried to load this file) I guess it's something from react-router-dom I tried to google it but I didn't find anything relevant ... can't put my finger hand on what I'm missing exactly.
thanks.