In my React project, the routing is performed by React Router. The thing is when this is supposed to handle different routes, the 404.html shows up instead. For my specific case
<BrowserRouter>
<Routes>
<Route path="/" element={user ? <Home /> : <SignIn />} />
<Route
path="/upload"
element={user ? <Upload /> : <SignIn />}
/>
<Route path="/chat" element={user ? <Chat /> : <SignIn />} />
<Route
path="/settings"
element={user ? <Settings /> : <SignIn />}
/>
</Routes>
</BrowserRouter>
The following is how I am handling Routes. It works on localhost but it doesn't work after Netlify build deploy.
Please do look at this link
If you want to look at the entire code, you can find it here
The Home
page works fine, but the chat
, settings
and upload
routes are being blocked by some cause.