Skip to content

Commit a541dca

Browse files
committed
Refactor routing and base path to remove hardcoded '/pasteur-lab' references
1 parent 9506e77 commit a541dca

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

public/404.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="utf-8" />
55
<title>Pasteur Laboratuvarı - Sayfa Bulunamadı</title>
66
<script>
7-
const path = window.location.pathname.replace("/pasteur-lab", "");
8-
window.location.replace("/pasteur-lab/?redirect=" + path);
7+
const path = window.location.pathname;
8+
window.location.replace("/?redirect=" + path);
99
</script>
1010
</head>
1111
<body></body>

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const App = () => (
4444
<TooltipProvider>
4545
<Toaster />
4646
<Sonner />
47-
<BrowserRouter basename="/pasteur-lab">
47+
<BrowserRouter>
4848
<ScrollToTop />
4949
<Routes>
5050
<Route path="/" element={<Index />} />

src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const params = new URLSearchParams(window.location.search);
66
const redirect = params.get("redirect");
77

88
if (redirect) {
9-
window.history.replaceState(null, "", "/pasteur-lab" + redirect);
9+
window.history.replaceState(null, "", redirect);
1010
}
1111

1212
createRoot(document.getElementById("root")!).render(<App />);

vite.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import react from "@vitejs/plugin-react-swc";
33
import path from "path";
44

55
export default defineConfig(() => ({
6-
base: "/pasteur-lab/",
76
plugins: [react()],
87
resolve: {
98
alias: {

0 commit comments

Comments
 (0)