Fixed login redirect.
This commit is contained in:
1 parent
367e0ecdf4
commit
5c933d1c4a
2 files changed
+2
-1
No files matched your search
@@ -13,7 +13,7 @@ export function useRequireLogin(handler?: (data?: object) => void) {
|
||||
|
||||
setUser(typeof handler === 'function' ? handler(data) : (data as any)?.user);
|
||||
} catch {
|
||||
location.href = `${process.env.basePath}/login`;
|
||||
location.href = `${process.env.basePath || ''}/login`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user