feat: add base path configuration

This commit is contained in:
2025-03-19 05:36:01 +07:00
parent 04a10eadfd
commit 2aaaf87dfd
11 changed files with 125 additions and 44 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ import appStore from "@/stores/app-store";
import garageLogo from "@/assets/garage-logo.svg";
import { useMutation } from "@tanstack/react-query";
import api from "@/lib/api";
import * as utils from "@/lib/utils";
import { toast } from "sonner";
import { useAuth } from "@/hooks/useAuth";
@@ -93,7 +94,7 @@ const LogoutButton = () => {
const logout = useMutation({
mutationFn: () => api.post("/auth/logout"),
onSuccess: () => {
window.location.href = "/auth/login";
window.location.href = utils.url("/auth/login");
},
onError: (err) => {
toast.error(err?.message || "Unknown error");