fix middleware and login logout

This commit is contained in:
2025-06-16 11:12:51 +08:00
parent efaca622c2
commit 40a77277f5
4 changed files with 58 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ export default function InvalidUser() {
await fetch("/api/auth/logout", {
method: "GET",
});
router.push("/", { scroll: false });
router.replace("/login", { scroll: false });
setIsLoading(false);
} catch (error) {
setIsLoading(false);