mirror of
https://github.com/khairul169/garage-webui.git
synced 2026-09-15 00:43:21 +07:00
feat: add base path configuration
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user