Skip to content

Commit

Permalink
Fix router on subpath
Browse files Browse the repository at this point in the history
  • Loading branch information
wizzomafizzo committed Jan 2, 2025
1 parent d18ab0d commit 0a07574
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import { CoreApiWebSocket } from "./components/CoreApiWebSocket.tsx";
import { FirebaseAuthentication } from "@capacitor-firebase/authentication";
import AppUrlListener from "./lib/deepLinks.tsx";

const router = createRouter({ routeTree });
const router = createRouter({
routeTree,
basepath: Capacitor.isNativePlatform() ? "/" : "/app/"
});

declare module "@tanstack/react-router" {
interface Register {
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { TanStackRouterVite } from "@tanstack/router-vite-plugin";

// https://vitejs.dev/config/
export default defineConfig({
base: "./",
// server: {
// host: "0.0.0.0",
// port: 8100
Expand Down

0 comments on commit 0a07574

Please sign in to comment.