mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-16 02:05:04 +01:00
Fixed login redirect.
This commit is contained in:
parent
367e0ecdf4
commit
5c933d1c4a
@ -19,6 +19,7 @@ const customResolver = resolve({
|
||||
|
||||
const aliasConfig = {
|
||||
entries: [
|
||||
{ find: /^app/, replacement: path.resolve('./src/app') },
|
||||
{ find: /^components/, replacement: path.resolve('./src/components') },
|
||||
{ find: /^hooks/, replacement: path.resolve('./src/hooks') },
|
||||
{ find: /^lib/, replacement: path.resolve('./src/lib') },
|
||||
|
@ -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`;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user