mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-17 06:03:22 +08:00
feat: 添加用户界面
This commit is contained in:
@@ -61,7 +61,9 @@ export enum ContentType {
|
||||
const redirectToLogin = () => {
|
||||
const redirectAfterLogin = encodeURIComponent(location.href);
|
||||
const search = `redirect=${redirectAfterLogin}`;
|
||||
const pathname = "/login";
|
||||
const pathname = location.pathname.startsWith("/user")
|
||||
? "/user/login"
|
||||
: "/login";
|
||||
window.location.href = `${pathname}?${search}`;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user