File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Toaster } from "@/components/ui/sonner" ;
22import { TooltipProvider } from "@/components/ui/tooltip" ;
33import NotFound from "@/pages/NotFound" ;
4- import { Route , Switch } from "wouter" ;
4+ import { Route , Switch , Router as WouterRouter } from "wouter" ;
55import ErrorBoundary from "./components/ErrorBoundary" ;
66import { ThemeProvider } from "./contexts/ThemeContext" ;
77import Home from "./pages/Home" ;
88
9- function Router ( ) {
9+ const base = import . meta. env . BASE_URL . replace ( / \/ $ / , "" ) || "" ;
10+
11+ function Routes ( ) {
1012 return (
1113 < Switch >
1214 < Route path = { "/" } component = { Home } />
@@ -22,7 +24,9 @@ function App() {
2224 < ThemeProvider defaultTheme = "light" >
2325 < TooltipProvider >
2426 < Toaster />
25- < Router />
27+ < WouterRouter base = { base } >
28+ < Routes />
29+ </ WouterRouter >
2630 </ TooltipProvider >
2731 </ ThemeProvider >
2832 </ ErrorBoundary >
You can’t perform that action at this time.
0 commit comments