Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
Move from HashRouter to BrowserRouter
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Guidée <[email protected]>
  • Loading branch information
quentinguidee committed Jan 31, 2024
1 parent 6b3929f commit b29945d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN npm run build
FROM nginx:alpine3.18-slim

COPY --from=build /app/dist /usr/share/nginx/html
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY docker/entrypoint.sh /

RUN ["chmod", "+x", "/entrypoint.sh"]
Expand Down
9 changes: 9 additions & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
}
6 changes: 3 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
HashRouter,
BrowserRouter,
Navigate,
Route,
Routes,
Expand Down Expand Up @@ -228,9 +228,9 @@ function App() {
return (
<div id="app" className={classNames("app", theme)}>
<QueryClientProvider client={queryClient}>
<HashRouter>
<BrowserRouter>
<AllRoutes />
</HashRouter>
</BrowserRouter>
</QueryClientProvider>
</div>
);
Expand Down

0 comments on commit b29945d

Please sign in to comment.